is, does scipy need an update, or did something unintended creep into
Numpy 1.0.2? (Hence the cross-post)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion
Travis Oliphant wrote:
Ryan May wrote:
Hi,
As far as I can tell, the new Numpy 1.0.2 broke scipy.io.loadmat.
Yes, it was the one place that scipy used the fact that field selection
of a 0-d array returned a scalar. This has been changed in NumPy 1.0.2
to return a 0-d array
, but the inconsistency with scalar operation made
debugging my problem more difficult.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http
the documentation is
eluding me at the moment.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
array will have count elements,
otherwise its
size is determined by the size of string. If sep is not empty then the
string is interpreted in ASCII mode and converted to the desired
number type
using sep as the separator between elements (extra whitespace is
ignored).
Ryan
--
Ryan
the
distribution differently than multiplying the distribution/density
function by a number.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http
Charles R Harris wrote:
On Jan 7, 2008 8:47 AM, Ryan May [EMAIL PROTECTED] mailto:[EMAIL
PROTECTED] wrote:
Stuart Brorson wrote:
I realize NumPy != Matlab, but I'd wager that most users would think
that this is the natural behavior..
Well, that behavior won't
= N.ctypeslib.load_library('test1ctypes.so', '.')
or try to get gcc to make a test1ctypes.dylib.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http
a built
in function that will do what you want. However, you would mask that
builtin with the from numpy import *.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion
considering the
prevalence of Barnes/Cressman weighting for spatial averaging
typically used in meteorology. And if you have no idea what I'm
talking about, Google them, and you'll see. :)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
considering the
prevalence of Barnes/Cressman weighting for spatial averaging
typically used in meteorology. And if you have no idea what I'm
talking about, Google them, and you'll see. :)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
complex data from some routine into a new
array (without specifying a dtype) ends up with the complex downcast
silently to float64. The only reason you even notice it is because at
the end you have incorrect answers. I know to look for it now, but for
inexperienced users, it's a pain.
Ryan
--
Ryan
.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
as a non-issue/'not a big deal'.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
resubscribe?
I'm seeing traffic on numpy-tickets since about the time scipy-tickets
came back. I'd try resubscribing.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
that. It wasn't
helpful and I apologize.
Actually, Darren, I found you fairly entertaining.
;)
Agreed. I found it actually helpful in hammering home something said
by Travis that was somewhat ignored.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
([1, ly - 1)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
the textbook use case for the python 2.5/2.6 context
manager. Pity we can't use it yet... (and I'm not sure it'd be easy
to wrap around the calls here.)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy
On Wed, Mar 17, 2010 at 9:20 AM, Darren Dale dsdal...@gmail.com wrote:
On Wed, Mar 17, 2010 at 10:11 AM, Ryan May rma...@gmail.com wrote:
On Wed, Mar 17, 2010 at 7:19 AM, Darren Dale dsdal...@gmail.com wrote:
Is this general enough for your use case? I haven't tried to think
about how
the next release after that.
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
fix_gradient_with_subclasses.diff
Description: Binary data
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http
of ndarray.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
.dev8297'
Thoughts?
(Filed at: http://projects.scipy.org/numpy/ticket/1436)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org
at the moment to
come up with a more complete fix.
That fixed it for me, thanks for getting done quickly.
What's amusing is that I found it because pupynere was failing to
write files where a variable had an attribute that consisted of a
single letter.
Ryan
--
Ryan May
Graduate Research Assistant
Hi,
I found that trapz() doesn't work with subclasses:
http://projects.scipy.org/numpy/ticket/1438
A simple patch (attached) to change asarray() to asanyarray() fixes
the problem fine.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
On Sun, Mar 21, 2010 at 11:57 PM, josef.p...@gmail.com wrote:
On Mon, Mar 22, 2010 at 12:49 AM, Ryan May rma...@gmail.com wrote:
Hi,
I found that trapz() doesn't work with subclasses:
http://projects.scipy.org/numpy/ticket/1438
A simple patch (attached) to change asarray() to asanyarray
On Mon, Mar 22, 2010 at 8:14 AM, Ryan May rma...@gmail.com wrote:
On Sun, Mar 21, 2010 at 11:57 PM, josef.p...@gmail.com wrote:
On Mon, Mar 22, 2010 at 12:49 AM, Ryan May rma...@gmail.com wrote:
Hi,
I found that trapz() doesn't work with subclasses:
http://projects.scipy.org/numpy/ticket
On Sat, Mar 27, 2010 at 11:12 AM, josef.p...@gmail.com wrote:
On Sat, Mar 27, 2010 at 1:00 PM, Ryan May rma...@gmail.com wrote:
On Mon, Mar 22, 2010 at 8:14 AM, Ryan May rma...@gmail.com wrote:
On Sun, Mar 21, 2010 at 11:57 PM, josef.p...@gmail.com wrote:
On Mon, Mar 22, 2010 at 12:49 AM
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Mon, Mar 29, 2010 at 8:00 AM, Bruce Southey bsout...@gmail.com wrote:
On 03/27/2010 01:31 PM, Ryan May wrote:
Because of the call to asarray(), the mask is completely discarded and
you end up with identical results to an unmasked array,
which is not what I'd expect. Worse, the actual
this addresses the concerns that were raised about the changes
for subclasses in this case. Let me know if I've missed something (or
if there's no way in hell any such patch will ever be committed).
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
, is there something wrong with the support for 2to3
that already exists within distutils? (Other than it just being
distutils)
http://bruynooghe.blogspot.com/2010/03/using-lib2to3-in-setuppy.html
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
more obvious (doing a multiply between
boolean arrays to get an AND operator seems a tad odd):
x[(23x) (x45)] = 0
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy
On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
friedrichromst...@gmail.com wrote:
2010/3/30 Ryan May rma...@gmail.com:
On Tue, Mar 30, 2010 at 11:12 AM, Alan G Isaac ais...@american.edu wrote:
On 3/30/2010 12:56 PM, Sean Mulcahy wrote:
512x512 arrays. I would like to set elements
On Tue, Mar 30, 2010 at 3:40 PM, Robert Kern robert.k...@gmail.com wrote:
On Tue, Mar 30, 2010 at 16:35, Ryan May rma...@gmail.com wrote:
On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
friedrichromst...@gmail.com wrote:
x *= ((x = 23) | (x = 45)) .
Interesting. In an ideal world, I'd
, -53.584962500721154)
-1.5849625007211561
np.version.version
'2.0.0.dev8313'
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo
need to do is:
if b.any():
or:
if b.all()
Now for determining empty or not, you'll need to look at len(b) or b.shape
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy
On Fri, Apr 2, 2010 at 8:31 AM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Apr 2, 2010 at 08:28, Ryan May rma...@gmail.com wrote:
On Thu, Apr 1, 2010 at 10:07 PM, Shailendra shailendra.vi...@gmail.com
wrote:
Hi All,
Below is some array behaviour which i think is odd
a=arange(10
it's because you're trying to replace
the object pointed to by the .data attribute. Instead, try to just
change the bits contained in .data:
basic.data['Air_Temp'].data[:] = np.ones(len(basic.data['Air_Temp']))*30
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University
something. It feels to me like it's violating the principle
of in the face of ambiguity, resist the temptation to guess.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy
.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
atleast_1d(d).astype('d')
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
asarray() but would work fine with
masked arrays (or other subclasses), feel free to file/post as a bug.
It's good to get those cases fixed where possible. (I've done this in
the past.)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Out[8]: (3, 4, 5, 6, 2)
So it behaves just like insert. But len(a.shape) is rather
cumbersome, especially if you haven't given a a name yet:
It's available as a.ndim
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
as module functions?
Hi Bob,
this is a very good question.
I think the answers are
a) historical reasons AND, more importantly, differing personal preferences
b) I would file the missing data.diff() as a bug.
It's not.
Care to elaborate?
--
Ryan May
Graduate Research Assistant
School
matplotlib code.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Robert Kern wrote:
On Tue, Jul 1, 2008 at 19:19, Ryan May [EMAIL PROTECTED] wrote:
Robert Kern wrote:
On Tue, Jul 1, 2008 at 17:50, Fernando Perez [EMAIL PROTECTED] wrote:
On Tue, Jul 1, 2008 at 1:41 PM, Pauli Virtanen [EMAIL PROTECTED] wrote:
But it's a custom tweak to doctest, so it might
,axis=axis)
nd = len(y.shape)
slice1 = [slice(None)]*nd
slice2 = [slice(None)]*nd
slice1[axis] = slice(1,None)
slice2[axis] = slice(None,-1)
return add.reduce(d * (y[slice1]+y[slice2])/2.0,axis)
For me, this works fine with supplying x for axis != -1.
Ryan
--
Ryan May
add an extra dimension to
the end. Once I resize x, I can get this to work. You might want to
look at this: http://www.scipy.org/EricsBroadcastingDoc
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
this in for 1.1.1?
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--- io.py.bak 2008-07-18 18:12:17.0 -0400
+++ io.py 2008-07-16 22:49:13.0 -0400
@@ -292,8 +292,13 @@
if converters is None:
converters
]:
masked_array(data = --,
mask = True,
fill_value=1e+20)
In [12]: np.__version__
Out[12]: '1.1.0'
Is there a reason that the fill_value isn't inherited from the parent array?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Eric Firing wrote:
Ryan May wrote:
Hi,
I just noticed this and found it surprising:
In [8]: from numpy import ma
In [9]: a = ma.array([1,2,3,4],mask=[False,False,True,False],fill_value=0)
In [10]: a
Out[10]:
masked_array(data = [1 2 -- 4],
mask = [False False True False
', 25.301), ('BOB', 27.899)],
dtype=[('stid', '|S4'), ('temp', 'f8')])
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--- io.py.bak 2008-07-18
were specifically designed to add
functions that work well with masked/invalid data points. Why reinvent the
wheel here?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy
that the usecols no longer accept
arrays? The new behavior (in 1.1.1) breaks existing code that one of my
colleagues has. Can we get a patch in before 1.2 to get this working
with arrays again?
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Travis E. Oliphant wrote:
Ryan May wrote:
Stefan (or anyone else who can comment),
It appears that the usecols argument to loadtxt no longer accepts numpy
arrays:
Could you enter a ticket so we don't lose track of this. I don't
remember anything being intentional.
Done: #905
that it works fine for me. Can you or someone else
backport this to the 1.2 branch so that this bug is fixed in the next
release?
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing
Thanks a bunch for getting these done.
David Huard wrote:
Done in r5790.
On Fri, Sep 5, 2008 at 12:36 PM, Ryan May [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
David Huard wrote:
Hi Ryan,
I applied your patch in r5788 on the trunk.
I noticed
, 32-bit machine.
I am telling you all the time Robert to use Debian that it just works
and you say, no no, gentoo is the best. :)
And what's wrong with that? :) Once you get over the learning curve,
Gentoo works just fine. Must be Robert K.'s fault. :)
Ryan
--
Ryan May
Graduate Research
={0:lambda
s:int(s,16)})
HTH,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
give the shape you're
expecting.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
of Tongue In Cheek :)
It looks like you received some good answers to your question, but let
us know if your problems persist and we'll help you sort it out.
Well said.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Hi,
I noticed numpy.loadtxt has support for gzipped text files, but not for
bz2'd files. Here's a 3 line patch to add bzip2 support to loadtxt.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Index: numpy/lib/io.py
Charles R Harris wrote:
On Tue, Oct 21, 2008 at 1:30 PM, Ryan May [EMAIL PROTECTED] wrote:
Hi,
I noticed numpy.loadtxt has support for gzipped text files, but not for
bz2'd files. Here's a 3 line patch to add bzip2 support to loadtxt.
Ryan
--
Ryan May
Graduate Research Assistant
, self).__setitem__(*args)
def notify(self, *args):
print 'notify:', args
with also overriding setslice?
I haven't given this much thought, but you'd also likely need to do this
for the infix operators (+=, etc.).
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
/adding small
things like this.)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Pauli Virtanen wrote:
Hi,
Wed, 12 Nov 2008 10:16:35 -0600, Ryan May wrote:
Here's a quick diff to fix some typos in the docstrings for matlib.zeros
and matlib.ones. They're causing 2 (of many) failures in the doctests
for me on SVN HEAD.
There are probably bound to be more
, axis=0):
slices = [slice(None)] * len(array.shape)
slices[axis] = index
array[slices] = value
(Adapted from the code for numpy.diff)
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
to write up the patch for either
.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Stéfan van der Walt wrote:
2008/11/20 Ryan May [EMAIL PROTECTED]:
Does anyone know why numpy.loadtxt(), in checking the validity of a
filehandle, checks for the seek() method, which appears to have no
bearing on whether an object will work?
I think this is simply a naive mistake on my part
of boilerplace (declaring
dtypes, converters). While it's nothing I can't write, it still would be
easier to write it once within loadtxt and have it for everyone.
Any support for *any* of these ideas? Any suggestions on how the user
should pass in the information?
Thanks,
Ryan
--
Ryan May
Graduate
would see what you thought first.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Pierre GM wrote:
On Nov 25, 2008, at 2:06 PM, Ryan May wrote:
1) It looks like the function returns a structured array rather than a
rec array, so that fields are obtained by doing a dictionary access.
Since it's a dictionary access, is there any reason that the header
needs to be munged
On Nov 25, 2008, at 2:37 PM, Ryan May wrote:
What about doing the parsing and type inference in a loop and holding
onto the already split lines? Then loop through the lines with the
converters that were finally chosen? In addition to making my usecase
work, this has the benefit of not doing
fill value)?
I'll post that when I'm done and we can see if it looks like too much
functionality stapled together or not.
Sounds like a plan. Wouldn't mind getting more feedback from fellow
users before we get too deep, however...
Agreed. Anyone?
--
Ryan May
Graduate Research Assistant
on the code and on the
original idea of adding these capabilities to loadtxt().
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Index: lib/io.py
===
--- lib/io.py (revision 6099)
+++ lib
.)
* I'd probably get rid of StringConverter._get_from_dtype, as it is not
needed outside the __init__. You may wanna stick to the original __init__.
Done.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Pierre GM wrote:
On Nov 25, 2008, at 10:02 PM, Ryan May wrote:
Pierre GM wrote:
* Your locked version of update won't probably work either, as you
force
the converter to output a string (you set the status to largest
possible, that's the one that outputs strings). Why don't you set
=numpy.int32.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Pierre GM wrote:
On Nov 25, 2008, at 10:02 PM, Ryan May wrote:
Pierre GM wrote:
* Your locked version of update won't probably work either, as you
force
the converter to output a string (you set the status to largest
possible, that's the one that outputs strings). Why don't you set
John Hunter wrote:
On Tue, Nov 25, 2008 at 11:23 PM, Ryan May [EMAIL PROTECTED] wrote:
Updated patch attached. This includes:
* Updated docstring
* New tests
* Fixes for previous issues
* Fixes to make new tests actually work
I appreciate any and all feedback.
I'm having trouble
Manuel Metz wrote:
Ryan May wrote:
3) Better support for missing values. The docstring mentions a way of
handling missing values by passing in a converter. The problem with this is
that you have to pass in a converter for *every column* that will contain
missing values. If you have a text
.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
an explicit delimiter has been
provided, it strikes me that the code shouldn't try to further-
interpret it...
Does anyone else have any opinion here?
I agree. If the user explicity passes something as a delimiter, we
should use it and not try to be too smart.
+1
Ryan
--
Ryan May
of names in the
file and expects that data to be laid out the same.
Other than those, it's working fine for me here.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy
, this does not work because calling view
does not work for object arrays. I'm just looking for a simple way to
store date/time in my record array (currently a string field).
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Proposal :
Here's an extension
and not somewhere in core numpy itself (missing
values aside)? You have a pretty good masked array agnostic wrapper
that IMO could go in numpy, though maybe not as loadtxt.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
put the module in numpy.lib.io ? Elsewhere ?
Thx for any comment and suggestions.
Current version works out of the box for me.
Thanks for running point on this.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
was expecting that the underlying data wouldn't get modified while masked.
Is
this actual behavior expected?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion
(ints, floats, etc.) to compare against after
conversion
to determine if they're missing. This might needlessly complicate the function,
which I know you've already taken pains to optimize.
If there's no good way to do it, I'm content to live with a workaround.
Ryan
--
Ryan May
Graduate
to how
much
the new function can do (and how much work you've done).
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org
Pierre GM wrote:
On Dec 16, 2008, at 1:57 PM, Ryan May wrote:
I just noticed the following and I was kind of surprised:
a = ma.MaskedArray([1,2,3,4,5], mask=[False,True,True,False,False])
b = a*5
b
masked_array(data = [5 -- -- 20 25],
mask = [False True True False False
ms per loop
Timing for my example:
In [2]: timeit data['age']+=1
10 loops, best of 3: 150 ms per loop
Hope this helps.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy
think you may have reduced the complexity a bit too much. The python code
above sets all of the elements equal to a[i,j,1]. Is there any reason you can't
use slicing to avoid the loops?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
insight would be appreciated.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
differently in this case, but on the other I
understand why things work this way.
Ryan
On Jan 24, 2009, at 5:58 PM, Ryan May wrote:
Pierre,
I've found what I consider to be a bug in the new mafromtxt (though
apparently it
existed in earlier versions as well). If you have an entire column
Pierre GM wrote:
On Jan 24, 2009, at 6:23 PM, Ryan May wrote:
Ok, thanks. I've dug a little further, and it seems like the
problem is that a
column of all missing values ends up as a column of all None's.
When you create
a (masked) array from a list of None's, you end up with an object
(this is actually an
even bigger problem when executing fftw plans), however
type(a) still gives me class 'fftw3.planning.AlignedArray'.
This might help some:
http://www.scipy.org/Subclasses
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
together a patch.
Thanks,
Ryan
P.S. Thanks so much for your work on putting those utility functions in
recfunctions.py It makes it so much easier to have these functions available in
the library itself rather than needing to reinvent the wheel over and over.
--
Ryan May
Graduate Research
numpy.ones to fill
with fives makes no sense to me. But I would be +1 on having a function
called numpy.values or numpy.fill that would create and fill an ndarray
with arbitrary values.
I completely agree here.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University
1 - 100 of 165 matches
Mail list logo