Hi,
You can try masked_array module:
x = np.array([[0,1,2],[3,4,5],[6,7,8]])
I3 np.ma.masked_where(x1, x)
O3
masked_array(data =
[[-- 1 2]
[3 4 5]
[6 7 8]],
mask =
[[ True False False]
[False False False]
[False False False]],
fill_value = 99)
There might be a
Hello,
From the masked_values() documentation -
http://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.masked_values.html
I10 np.ma.masked_values(x, 1.5)
O10
masked_array(data = [ 1. 1.1 2. 1.1 3. ],
mask = False,
fill_value = 1.5)
I12 np.ma.masked_values(x,
On Thu, Mar 15, 2012 at 12:56 PM, Gökhan Sever gokhanse...@gmail.comwrote:
If not so, how can I return a set of False values if my masking condition
is not met?
Self-answer: I can force the mask to be filled with False's, however unsure
if this is a safe operation.
I50 x = np.array([1, 1.1, 2
On Thu, Mar 15, 2012 at 1:12 PM, Pierre GM pgmdevl...@gmail.com wrote:
Ciao Gökhan,
AFAIR, shrink is used only to force a collapse of a mask full of False,
not to force the creation of such a mask.
Now, it should work as you expected, meaning that it needs to be fixed.
Could you open a
Submitted the ticket at http://projects.scipy.org/numpy/ticket/2082
On Thu, Mar 15, 2012 at 1:24 PM, Gökhan Sever gokhanse...@gmail.com wrote:
On Thu, Mar 15, 2012 at 1:12 PM, Pierre GM pgmdevl...@gmail.com wrote:
Ciao Gökhan,
AFAIR, shrink is used only to force a collapse of a mask full
Yes, that's the behaviour that I expect setting the 'shrink' keyword to 'False'
Now, just to be clear, you'd want
'np.ma.masked_values(...,shrink=False) to create a maked array w/ a
full boolean mask by default, right ?
___
NumPy-Discussion mailing
Hello,
Could someone briefly explain why are these two operations are casting my
float32 arrays to float64?
I1 (np.arange(5, dtype='float32')).dtype
O1 dtype('float32')
I2 (10*np.arange(5, dtype='float32')).dtype
O2 dtype('float64')
I3 (np.arange(5, dtype='float32')[0]).dtype
O3
np.float32()*5e38
O16 2.77749998e+42
I17 (np.float32()*5e38).dtype
O17 dtype('float64')
IDL help, 5e38*float()
ExpressionFLOAT = Inf
In IDL, the expression doesn't get converted to DOUBLE. Perhaps, its a
design decision.
On Thu, Nov 15, 2012 at 8:24 PM, Gökhan
On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith n...@pobox.com wrote:
On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever gokhanse...@gmail.com
wrote:
Thanks for the explanations.
For either case, I was expecting to get float32 as a resulting data type.
Since, float32 is large enough
Hi Ondřej,
Any ideas that your manual syntax mapping would evolve to an automatic
translation tool like i2py [http://code.google.com/p/i2py/]
Thanks.
On Thu, Feb 7, 2013 at 12:22 PM, Ondřej Čertík ondrej.cer...@gmail.comwrote:
Hi,
I have recently setup a page about modern Fortran:
Hello,
Given this simple 2D array:
In [1]: np.arange(9).reshape((3,3))
Out[1]:
array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
In [2]: a = np.arange(9).reshape((3,3))
In [3]: a[:1:]
Out[3]: array([[0, 1, 2]])
In [4]: a[:1,:]
Out[4]: array([[0, 1, 2]])
Could you tell me why the last
...@googlemail.com wrote:
On 01.03.2014 00:32, Gökhan Sever wrote:
Hello,
Given this simple 2D array:
In [1]: np.arange(9).reshape((3,3))
Out[1]:
array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
In [2]: a = np.arange(9).reshape((3,3))
In [3]: a[:1:]
Out[3]: array([[0, 1, 2
Hello,
Consider these two simple masked arrays:
I[188]: a = np.ma.masked_equal([1,2,3], value=2)
I[189]: b = np.ma.masked_equal([4,3,2], value=2)
An operation like this voids the mask:
I[190]: np.append(a,b)
O[190]:
masked_array(data = [1 2 3 4 3 2],
mask = False,
You're using a standard numpy function on a masked array. It's hardly
surprising that you run into some issues. You should use the np.ma
equivalent. Except of course that the equivalent doesn't exist yet... Please
open a ticket.
Here it comes - http://projects.scipy.org/numpy/ticket/1623
On Wed, Sep 29, 2010 at 5:09 PM, Pierre GM pgmdevl...@gmail.com wrote:
On Sep 29, 2010, at 11:46 PM, josef.p...@gmail.com wrote:
any of the ma stack array function might also work, or not?
In np.ma.extras ? Most likely, yes
This seems to do what I want:
I[262]: np.ma.hstack(all_measured)
Hello,
mstats.linregress returns 6 values. I don't see this documented from
the function docstring. I know 0.91... is r. What is masked_array
return here?
I[29]: stats.mstats.linregress(np.ma.hstack(all_measured[0::6]),
np.ma.hstack(all_predicted[0::6]))
O[29]:
(2.6309756058562122,
On Tue, Feb 22, 2011 at 2:44 PM, Alan G Isaac alan.is...@gmail.com wrote:
I don't believe the matrix multiplication results.
Maybe I misunderstand them ...
t = timeit.Timer(np.dot(A,B),import numpy as
np;N=1500;A=np.random.random((N,N));B=np.random.random((N,N)))
print
Hello,
I am going to the PyCon this week. I am presenting a poster about an
atmospheric sciences related project -- the most active development
from my coding site over at http://code.google.com/p/ccnworks/
Is there anybody in the community participating there as well? Any
plans for sprinting or
Yung-Yu,
We are advertised on this blog
http://pycon.blogspot.com/2011/03/pycon-2011-outside-talks-poster-session.html
I will be in the conference venue by tomorrow morning. There are many
interesting talks and posters that I look forward seeing plus meeting
those presenters.
See you in
Hello,
Given this piece of code (I can provide the meg file off-the list for those
who wants to reproduce the error)
import numpy as np
f = open(a08A0122.341071.meg, rb)
dt = np.dtype([('line1', '|S80'), ('line2', np.object_), ('line3', '|S80'),
('line4', '|S80'),
('line5',
On Fri, Apr 22, 2011 at 12:37 PM, Ralf Gommers
ralf.gomm...@googlemail.comwrote:
On Thu, Apr 21, 2011 at 10:06 PM, Gökhan Sever gokhanse...@gmail.com
wrote:
Hello,
Given this piece of code (I can provide the meg file off-the list for
those
who wants to reproduce the error)
Can you
On Fri, Apr 22, 2011 at 6:32 PM, Mark Wiebe mwwi...@gmail.com wrote:
I took a quick look at this issue and committed a fix. PyArray_FromString
was doing a check to exclude object arrays, but that check was incorrect.
Now it should appropriately raise an exception instead of creating an
Hello,
The following snippet works fine for a regular string and prints out
the string without a problem.
python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type help, copyright, credits or license for more information.
mystr = uöööğğğ
mystr
On Thu, Jun 16, 2011 at 8:54 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Wed, Jun 15, 2011 at 1:30 PM, Gökhan Sever gokhanse...@gmail.com wrote:
Hello,
The following snippet works fine for a regular string and prints out
the string without a problem.
python
Python 2.7 (r27
Here are my values for your comparison:
test.nc file is about 715 MB. The details are below:
In [21]: netCDF4.__version__
Out[21]: '0.9.4'
In [22]: np.__version__
Out[22]: '2.0.0.dev-b233716'
In [23]: from netCDF4 import Dataset
In [24]: f = Dataset(test.nc)
In [25]:
@ccn at Aug 3 10:51:43 ...
kernel:[48715.531332] Code: be 33 01 00 00 48 89 fb 48 c7 c7 67 31 7a 81 e8
b0 2d f1 ff e8 90 f2 33 00 48 89 df e8 86 db 00 00 48 83 bb 60 01 00 00 00
74 02 0f 0b 48 8b 83 10 02 00 00 a8 20 75 02 0f 0b a8 40 74 02 0f 0b
On Wed, Aug 3, 2011 at 10:46 AM, Gökhan Sever
This is what I get here:
In [1]: a = np.zeros((21601, 10801), dtype=np.uint16)
In [2]: a.tofile('temp.npa')
In [3]: del a
In [4]: timeit a = np.fromfile('temp.npa', dtype=np.uint16)
1 loops, best of 3: 251 ms per loop
On Wed, Aug 3, 2011 at 10:50 AM, Christopher Barker
...@noaa.govwrote:
On 8/3/11 9:46 AM, Gökhan Sever wrote:
In [23]: from netCDF4 import Dataset
In [24]: f = Dataset(test.nc http://test.nc)
In [25]: f.variables['reflectivity'].shape
Out[25]: (6, 18909, 506)
In [26]: f.variables['reflectivity'].size
Out[26]: 57407724
In [27
On Thu, Oct 13, 2011 at 10:13 AM, Chao YUE chaoyue...@gmail.com wrote:
Dear all,
sorry for this stupid question but I cannot find it in numpy tutorial or
google.
suppose I have a=np.arange(11).
In [32]: a 8
Out[32]:
array([ True, True, True, True, True, True, True, True, False,
On Thu, Oct 13, 2011 at 4:03 PM, Gökhan Sever gokhanse...@gmail.com wrote:
I think, IPython is great for interaction with the OO interface of the
matlab. Just starting simple with:
fig=plt.figure()
ax=plt.gca()
and keep tabbing ax.tab, fig.tab or any object you create on the canvas
.tab
On Thu, Oct 13, 2011 at 4:15 PM, Benjamin Root ben.r...@ou.edu wrote:
Myself and other developers would greatly appreciate help from the
community to point out which examples are too confusing or out of date. We
It would be nice to have a social interface for the mpl gallery like the one
Hello,
I have two aircraft based aerosol measurements. The first one is dccnConSTP
(blue), and the latter is CPCConc (red) as shown in this screen capture. (
http://img513.imageshack.us/img513/7498/ccncpclag.png). My goal is to
compare these two measurements. It is expected to see that they must
On Tue, Nov 10, 2009 at 12:09 PM, Darryl Wallace
darryl.wall...@prosensus.ca wrote:
Hello again,
The best way so far that's come to my attention is to use:
numpy.ma.masked_object
The problem with this is that it's looking for a specific instance of an
object. So if the user had some elements
On Wed, Nov 11, 2009 at 11:53 AM, per freem perfr...@gmail.com wrote:
hi all,
i've been using genfromtxt to parse tab separated files for plotting
purposes in matplotlib. the problem is that genfromtxt seems to give
only two ways to access the contents of the file: one is by column,
where
On Thu, Nov 12, 2009 at 9:14 PM, Sturla Molden stu...@molden.no wrote:
Alexey Tigarev skrev:
I have implemented multiple regression in a following way:
You should be using QR or SVD for this.
Sturla
Seeing this QR and SVD terms I recalled the answer to the I am the very
model for a
On Sat, Nov 14, 2009 at 9:29 AM, Darren Dale dsdal...@gmail.com wrote:
Please excuse the cross-post. I have installed distribute-0.6.8 and
numpy-svn into my ~/.local/lib/python2.6/site-packages (using python
setup.py install --user). I am now trying to install Enthought's
Enable from a fresh
Hello,
I have a data which represents aerosol size distribution in between 0.1 to
3.0 micrometer ranges. I would like extrapolate the lower size down to 10
nm. The data in this context is log-normally distributed. Therefore I am
looking a way to fit a log-normal curve onto my data. Could you
On Tue, Nov 17, 2009 at 12:13 AM, Ian Mallett geometr...@gmail.com wrote:
Theory wise:
-Do a linear regression on your data.
-Apply a logrithmic transform to your data's dependent variable, and do
another linear regression.
-Apply a logrithmic transform to your data's independent variable,
On Thu, Nov 19, 2009 at 9:12 PM, Ian Mallett geometr...@gmail.com wrote:
Hello,
My analysis shows that the exponential regression gives the best result
(r^2=87%)--power regression gives worse results (r^2=77%). Untransformed
data gives r^2=76%.
I don't think you want lognorm. If I'm not
long-term data
sets are analyzed, and (4) it is a useful tool in the studies of atmospheric
aerosol particle formation and transformation.
The full-text is freely available at:
http://www.borenv.net/BER/pdfs/ber10/ber10-337.pdf
On Mon, Nov 16, 2009 at 11:44 PM, Gökhan Sever gokhanse
On Mon, Nov 23, 2009 at 7:07 PM, rkdeli...@gmail.com wrote:
An application package that I have requires Python 2.6 and NumPy.
I've installed Python 2.6 in a parallel manner as follows:
NO modification of the core Python2.4 in /usr/bin has been done. Rather, I
installed Python 2.6 under
On Thu, Nov 26, 2009 at 11:30 PM, Richared Beare
richard.be...@sci.monash.edu.au wrote:
I have been unable to find a way of doing a very simple thing: saving
data that contains both arrays of numerical values and arrays of string
values, using savetxt in numpy.
As a very simple example,
Hello,
Here are the steps that I went through to install the numpy from the
svn-repo:
svn co http://svn.scipy.org/svn/numpy/trunk numpy
Be su and type: python setupegg.py develop
Successful installation so far, but import fails with the given error:
[gse...@ccn Desktop]$ python
Python 2.6
On Tue, Dec 22, 2009 at 9:05 AM, David Cournapeau courn...@gmail.comwrote:
Hi,
I have just released the 2nd release candidate for numpy 1.4.0, which
fixes a few critical bugs founds since the RC1. Tarballs and binary
installers for numpy/scipy may be found on
On Thu, Dec 24, 2009 at 4:57 PM, David Cournapeau courn...@gmail.comwrote:
On Wed, Dec 23, 2009 at 1:41 AM, Gökhan Sever gokhanse...@gmail.com
wrote:
On Tue, Dec 22, 2009 at 9:05 AM, David Cournapeau courn...@gmail.com
wrote:
Hi,
I have just released the 2nd release candidate
On Sat, Dec 26, 2009 at 4:15 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Sat, Dec 26, 2009 at 2:19 PM, Gökhan Sever gokhanse...@gmail.comwrote:
On Thu, Dec 24, 2009 at 4:57 PM, David Cournapeau courn...@gmail.comwrote:
On Wed, Dec 23, 2009 at 1:41 AM, Gökhan Sever gokhanse
On Sat, Dec 26, 2009 at 6:09 PM, David Cournapeau courn...@gmail.comwrote:
On Sun, Dec 27, 2009 at 6:19 AM, Gökhan Sever gokhanse...@gmail.com
wrote:
For the develop, it is one of easiest ways to catch up the bug-fixes even
though I don't work on the source directly. So far besides a few
On Mon, Dec 28, 2009 at 10:31 AM, Gökhan Sever gokhanse...@gmail.comwrote:
On Sat, Dec 26, 2009 at 6:09 PM, David Cournapeau courn...@gmail.comwrote:
On Sun, Dec 27, 2009 at 6:19 AM, Gökhan Sever gokhanse...@gmail.com
wrote:
For the develop, it is one of easiest ways to catch up
On Mon, Dec 28, 2009 at 11:07 AM, Robert Kern robert.k...@gmail.com wrote:
On Mon, Dec 28, 2009 at 11:00, Gökhan Sever gokhanse...@gmail.com wrote:
One interesting thing I have noticed while installing the numpy from the
source is that numpy dependent libraries must be re-installed
On Mon, Dec 28, 2009 at 11:16 AM, Gökhan Sever gokhanse...@gmail.comwrote:
On Mon, Dec 28, 2009 at 11:07 AM, Robert Kern robert.k...@gmail.comwrote:
On Mon, Dec 28, 2009 at 11:00, Gökhan Sever gokhanse...@gmail.com
wrote:
One interesting thing I have noticed while installing the numpy
On Mon, Dec 28, 2009 at 12:15 PM, Gökhan Sever gokhanse...@gmail.comwrote:
On Mon, Dec 28, 2009 at 11:16 AM, Gökhan Sever gokhanse...@gmail.comwrote:
On Mon, Dec 28, 2009 at 11:07 AM, Robert Kern robert.k...@gmail.comwrote:
On Mon, Dec 28, 2009 at 11:00, Gökhan Sever gokhanse
Hello,
I have thought of this might interesting to share. Register at
www.sagenb.org or try on your local Sage-notebook and using the following
code:
# Simple example demonstrating how to interact with matplotlib directly.
# Comment plt.clf() to get the plots overlay in each update.
# Gokhan
Hi,
Simple question:
I[4]: a = np.arange(10)
I[5]: b = np.array(5)
I[8]: a*b.cumsum()
O[8]: array([ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45])
I[9]: np.array(a*b).cumsum()
O[9]: array([ 0, 5, 15, 30, 50, 75, 105, 140, 180, 225])
Is there a syntactic equivalent for the I[9] --for instance
On Wed, Feb 10, 2010 at 10:06 AM, Angus McMorland amcm...@gmail.com wrote:
On 10 February 2010 11:02, Gökhan Sever gokhanse...@gmail.com wrote:
Hi,
Simple question:
I[4]: a = np.arange(10)
I[5]: b = np.array(5)
I[8]: a*b.cumsum()
O[8]: array([ 0, 5, 10, 15, 20, 25, 30, 35
On Wed, Feb 10, 2010 at 10:12 AM, Gökhan Sever gokhanse...@gmail.comwrote:
On Wed, Feb 10, 2010 at 10:06 AM, Angus McMorland amcm...@gmail.comwrote:
On 10 February 2010 11:02, Gökhan Sever gokhanse...@gmail.com wrote:
Hi,
Simple question:
I[4]: a = np.arange(10)
I[5]: b
On Sun, Feb 21, 2010 at 4:30 AM, Charles R Harris charlesr.har...@gmail.com
wrote:
Hi All,
I would be much obliged if some folks would run the attached script and
report the output, numpy version, and python version. It just runs
np.isinf(np.inf), which raises an invalid value warning with
Hello,
Since after Robert Kern showed http://advice.mechanicalkern.com/ on SciPy09
there are many similar initiatives that uses stackoverflow.com (SO) layout.
Some smart guys come up with this site http://stackexchange.com/ to those
who want to have a simple but a paid solution.
I don't have an
On Sun, Feb 21, 2010 at 4:06 PM, Robert Kern robert.k...@gmail.com wrote:
On Sun, Feb 21, 2010 at 16:00, Gökhan Sever gokhanse...@gmail.com wrote:
Hello,
Since after Robert Kern showed http://advice.mechanicalkern.com/ on
SciPy09
there are many similar initiatives that uses
Hello,
I am working on a code shown at
http://code.google.com/p/ccnworks/source/browse/trunk/thesis/part1/logn-fit.py
I use the code to analyse a couple dataset also placed in the same
directory. In the first part I use for-loops all over, but later decided to
write them without using for loops.
On Fri, Mar 5, 2010 at 8:00 AM, Bruce Schultz bruce.schu...@gmail.comwrote:
Hi,
I've just started playing with numpy and have noticed that when printing a
structured array that the output is not nicely formatted. Is there a way to
make the formatting look the same as it does for an
Hello,
Please tolerate my impatience for being the first announcing the new
discussion platform :) and my cross-posting over the lists.
The new site is beating at ask.scipy.org . David Warde-Farley is moving the
questions from the old-site at advice.mechanicalkern.com (announced at
SciPy09 by
On Fri, Mar 19, 2010 at 10:17 AM, Joe Kington jking...@wisc.edu wrote:
See itertools.permutations (python standard library)
e.g.
In [3]: list(itertools.permutations([1,1,0,0]))
Out[3]:
[(1, 1, 0, 0),
(1, 1, 0, 0),
(1, 0, 1, 0),
(1, 0, 0, 1),
(1, 0, 1, 0),
(1, 0, 0, 1),
(1, 1, 0,
Hello,
Is there a simpler way to get c from a
I[1]: a = np.arange(10)
I[2]: b = a[3:]
I[3]: b
O[3]: array([3, 4, 5, 6, 7, 8, 9])
I[4]: c = np.insert(b, [7]*3, 0)
O[5]: array([3, 4, 5, 6, 7, 8, 9, 0, 0, 0])
a and c have to be same in length and the left shift must be balanced with
equal
On Sat, Apr 10, 2010 at 7:31 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Sat, Apr 10, 2010 at 6:17 PM, Gökhan Sever gokhanse...@gmail.comwrote:
Hello,
Is there a simpler way to get c from a
I[1]: a = np.arange(10)
I[2]: b = a[3:]
I[3]: b
O[3]: array([3, 4, 5, 6, 7, 8
On Mon, Apr 12, 2010 at 9:21 AM, Nicola Creati ncre...@inogs.it wrote:
Hello,
I want to calculate, given a one dimension array, the sum over every two
elements of the array.
I found this working solution:
a = N.arange(10)
b = a.reshape(a, (5, 2))
c = b.sum(axis=1)
Is there any better
On Mon, Apr 12, 2010 at 9:41 PM, Angus McMorland amcm...@gmail.com wrote:
Hi all,
I want to sort a 2d array along one dimension, with the indices returned by
argsort, but the subsequent indexing syntax to get the sorted array is not
obvious.
The following works, but I wonder if there is a
On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners p...@shinners.org wrote:
I have an array that represents the number of times a value has been
given. I'm trying to find a direct numpy way to add into these sums
without requiring a Python loop.
For example, say there are 10 possible values. I
On Wed, Apr 14, 2010 at 1:34 AM, Warren Weckesser
warren.weckes...@enthought.com wrote:
Gökhan Sever wrote:
On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners p...@shinners.org
mailto:p...@shinners.org wrote:
I have an array that represents the number of times a value has been
On Wed, Apr 14, 2010 at 10:16 AM, Nikolaus Rath nikol...@rath.org wrote:
Hello,
How do I best find out the indices of the largest x elements in an
array?
Example:
a = [ [1,8,2], [2,1,3] ]
magic_function(a, 2) == [ (0,1), (1,2) ]
Since the largest 2 elements are at positions (0,1) and
Hello,
Is b an expected value? I am suspecting another floating point arithmetic
issue.
I[1]: a = np.arange(1.6, 1.8, 0.1, dtype='float32')
I[2]: a
O[2]: array([ 1.6002, 1.7005], dtype=float32)
I[3]: b = np.arange(1.7, 1.8, 0.1, dtype='float32')
I[4]: b
O[4]: array([ 1.7005,
On Sat, May 1, 2010 at 3:36 PM, Gökhan Sever gokhanse...@gmail.com wrote:
Hello,
Is b an expected value? I am suspecting another floating point arithmetic
issue.
I[1]: a = np.arange(1.6, 1.8, 0.1, dtype='float32')
I[2]: a
O[2]: array([ 1.6002, 1.7005], dtype=float32)
I[3]: b
Hello,
I have the following arrays read as masked array.
I[10]: basic.data['Air_Temp'].mask
O[10]: array([ True, False, False, ..., False, False, False], dtype=bool)
[12]: basic.data['Press_Alt'].mask
O[12]: False
I[13]: len basic.data['Air_Temp']
- len(basic.data['Air_Temp'])
O[13]: 1758
Hello,
Consider my masked arrays:
I[28]: type basic.data['Air_Temp']
- type(basic.data['Air_Temp'])
O[28]: numpy.ma.core.MaskedArray
I[29]: basic.data['Air_Temp']
O[29]:
masked_array(data = [-- -- -- ..., -- -- --],
mask = [ True True True ..., True True True],
On Sat, May 8, 2010 at 9:16 PM, Ryan May rma...@gmail.com wrote:
On Sat, May 8, 2010 at 7:52 PM, Gökhan Sever gokhanse...@gmail.com
wrote:
Hello,
Consider my masked arrays:
I[28]: type basic.data['Air_Temp']
- type(basic.data['Air_Temp'])
O[28]: numpy.ma.core.MaskedArray
I
On Sat, May 8, 2010 at 9:29 PM, Eric Firing efir...@hawaii.edu wrote:
On 05/08/2010 04:16 PM, Ryan May wrote:
On Sat, May 8, 2010 at 7:52 PM, Gökhan Severgokhanse...@gmail.com
wrote:
Hello,
Consider my masked arrays:
I[28]: type basic.data['Air_Temp']
-
On Fri, May 7, 2010 at 3:28 PM, Pierre GM pgmdevl...@gmail.com wrote:
On May 4, 2010, at 8:38 PM, Gökhan Sever wrote:
Hello,
I have the following arrays read as masked array.
I[10]: basic.data['Air_Temp'].mask
O[10]: array([ True, False, False, ..., False, False, False], dtype=bool
On Sun, May 9, 2010 at 2:42 PM, Eric Firing efir...@hawaii.edu wrote:
The mask attribute can be a full array, or it can be a scalar to
indicate that nothing is masked. This is an optimization in masked
arrays; it adds complexity, but it can save space and/or processing
time. You can always
Floating point numbers; one of my recent favorite subjects... See this
hot Slashdot discussion subject: what every programmer should know
about floating-point arithmetic
On 5/16/10, Alan G Isaac ais...@american.edu wrote:
On 5/16/2010 12:03 AM, Gabriel Mihalache wrote:
The eigenvalue should be
On Tue, Jun 8, 2010 at 11:24 AM, Andreas Hilboll li...@hilboll.de wrote:
Hi there,
I have a problem, which I'm sure can somehow be solved using np.choose()
- but I cannot figure out how :(
I have an array idx, which holds int values and has a 2d shape. All
values inside idx are 0 = idx n.
If we were at so or ask.scipy I would vote for Mark's solution :)
Usually in cases like yours, I tend to use the shortest version of the
solutions.
On Tue, Jun 8, 2010 at 2:08 PM, Andreas Hilboll li...@hilboll.de wrote:
Hi,
newtimes = [times[idx[x][y]] for x in range(2) for y in range(2)]
On Tue, Jun 8, 2010 at 2:32 PM, Hans Meine
me...@informatik.uni-hamburg.dewrote:
Funny, that's exactly what I wanted to do (idx being a label/region image
here),
and what I tried today.
You will be happy to hear that the even simpler solution is to just use
fancy indexing (the name is
On Wed, Aug 4, 2010 at 6:59 PM, phob...@geosyntec.com wrote:
Hey folks,
I've one array, x, that you could define as follows:
[[1, 2.25],
[2, 2.50],
[3, 2.25],
[4, 0.00],
[8, 0.00],
[9, 2.75]]
Then my second array, y, is:
[[1, 0.00],
[2, 0.00],
[3, 0.00],
[4, 0.00],
[5,
On Wed, Aug 4, 2010 at 8:00 PM, Gökhan Sever gokhanse...@gmail.com wrote:
On Wed, Aug 4, 2010 at 6:59 PM, phob...@geosyntec.com wrote:
Hey folks,
I've one array, x, that you could define as follows:
[[1, 2.25],
[2, 2.50],
[3, 2.25],
[4, 0.00],
[8, 0.00],
[9, 2.75]]
Then my
Hello,
There is a nice e-mailing trend tool for Gmail users at
http://code.google.com/p/mail-trends/
It is a command line tool producing an html output showing your e-mailing
statistics. In my inbox, the following threads are highly ranked in the top
threads section.
[Numpy-discussion]
Hi,
@ http://new.scipy.org/download.html numpy and scipy links for Fedora is
broken.
Could you update the links with these?
https://admin.fedoraproject.org/pkgdb/acls/name/numpy
https://admin.fedoraproject.org/pkgdb/acls/name/numpy
https://admin.fedoraproject.org/pkgdb/acls/name/scipy
Thanks.
On Thu, Aug 19, 2010 at 9:01 AM, greg whittier gre...@gmail.com wrote:
I frequently deal with 3D data and would like to sum (or find the
mean, etc.) over the last two axes. I.e. sum a[i,j,k] over j and k.
I find using .sum() really convenient for 2d arrays but end up
reshaping 2d arrays to
On Wed, Sep 15, 2010 at 2:34 PM, Benjamin Root ben.r...@ou.edu wrote:
Hello,
I am trying to solve a problem in matplotlib where I would have an array of
floating point numbers and I want to quickly determine what is the closest
common offset to a power of 10. In other words, if given:
Hello,
Consider these two sets of container arrays --one defined as usual np array
the others as ma arrays:
all_measured = np.ma.zeros((16, 18))
all_predicted = np.ma.zeros((16, 18))
all_measured2 = np.zeros((16, 18))
all_predicted2 = np.zeros((16, 18))
I do a computation within
On Mon, Sep 20, 2010 at 1:05 PM, Robert Kern robert.k...@gmail.com wrote:
Are you asking about when masked arrays are casted to ndarrays (and
thus losing the mask information)? Most times when a function uses
asarray() or array() to explicitly cast the inputs to an ndarray. The
reason that
On Mon, Sep 20, 2010 at 3:34 PM, Benjamin Root ben.r...@ou.edu wrote:
I have been using masked arrays quite extensively. My take on them is that
if a masked array makes sense in that operation, then they should still work
with the regular functions. However, there have been many cases where
On Tue, Sep 21, 2010 at 1:55 AM, Peter Schmidtke
pschmid...@mmb.pcb.ub.eswrote:
Dear all,
I'd like to know if there is a pythonic / numpy way of retrieving unique
lines of a 2d numpy array.
In a way I have this :
[[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
[409 152]
Hello,
Could you please give me some hints about how to mask an array using another
arrays like in the following example.
In [14]: a = arange(5)
In [15]: a
Out[15]: array([0, 1, 2, 3, 4])
and my secondary array is b
In [16]: b = array([2,3])
What I want to do is to mask a with b values and
,
simplicity, clarity and elegance about it.
Gökhan
On Wed, Apr 22, 2009 at 4:49 PM, Pierre GM pgmdevl...@gmail.com wrote:
On Apr 22, 2009, at 5:21 PM, Gökhan SEVER wrote:
Hello,
Could you please give me some hints about how to mask an array using
another arrays like in the following example
On Thu, Apr 23, 2009 at 12:16 AM, Gael Varoquaux
gael.varoqu...@normalesup.org wrote:
On Wed, Apr 22, 2009 at 04:21:05PM -0500, Gökhan SEVER wrote:
Could you please give me some hints about how to mask an array using
another arrays like in the following example.
In [14]: a = arange
Hello,
Is there a way to write a header information to a text file using savetxt
command besides dumping arrays in the same file?
In little detailed fashion: I have to write a few long column of arrays into
a text file. While doing that I need to put some information regarding to
the context of
Thanks for the quick reply.
Exact solution !
Gökhan
On Sun, May 17, 2009 at 6:57 PM, Michael S. Gilbert
michael.s.gilb...@gmail.com wrote:
fid = open( 'file' , 'w' )
fid.write( 'header\n' )
savetxt( fid , data )
fid.close()
On Sun, 17 May 2009 18:54:33 -0500 Gökhan SEVER wrote
On Mon, Jun 8, 2009 at 12:11 PM, Jonno jonnojohn...@gmail.com wrote:
On Mon, Jun 8, 2009 at 11:35 AM, Gökhan SEVERgokhanse...@gmail.com
wrote:
Hello,
To me, IPython is the right way to follow. Try whos to see what's in
your
namespace.
You may want see this instructional video (A
On Mon, Jun 8, 2009 at 4:47 PM, Christopher Barker chris.bar...@noaa.govwrote:
Gael Varoquaux wrote:
Click in the menu: 'new file in remote browser', or something like this.
If you have editra installed, it will launch it, with a special plugin
allowing you to execute selected code in
Hello,
I am having problem while trying to memory map a simple file (attached as
test.txt)
In IPython
data = memmap('test.txt', mode='r', dtype=double, shape=(3,5))
data
memmap([[ 3.45616501e-86, 4.85780149e-33, 4.85787493e-33,
5.07185821e-86, 4.85780159e-33],
[
On Wed, Jun 10, 2009 at 12:34 AM, Matthew Brett matthew.br...@gmail.comwrote:
Hi,
I am having problem while trying to memory map a simple file (attached as
test.txt)
The file looks like a text file, but memmap is for binary files.
Could that be the problem?
Best,
Matthew
I don't
1 - 100 of 169 matches
Mail list logo