[Numpy-discussion] ANN: xray 0.3 released

2014-09-21 Thread Stephan Hoyer
I'm pleased to announce the v0.3 release for xray, N-D labeled arrays and datasets in Python. xray is an open source project and Python package that aims to bring the labeled data power of pandas to the physical sciences, by providing N-dimensional variants of the core pandas data structures, Seri

Re: [Numpy-discussion] Custom dtypes without C -- or, a standard ndarray-like type

2014-09-21 Thread Nathaniel Smith
On Sun, Sep 21, 2014 at 7:50 PM, Stephan Hoyer wrote: > pandas has some hacks to support custom types of data for which numpy can't > handle well enough or at all. Examples include datetime and Categorical [1], > and others like GeoArray [2] that haven't make it into pandas yet. > > Most of these

Re: [Numpy-discussion] Numpy 'None' comparison FutureWarning

2014-09-21 Thread Nathaniel Smith
On 22 Sep 2014 03:02, "Demitri Muna" wrote: > > > On Sep 21, 2014, at 5:19 PM, Eric Firing wrote: > >> I think what you are missing is that the standard Python idiom for this >> use case is "if self._some_array is None:". This will continue to work, >> regardless of whether the object being chec

Re: [Numpy-discussion] Numpy 'None' comparison FutureWarning

2014-09-21 Thread Demitri Muna
On Sep 21, 2014, at 5:19 PM, Eric Firing wrote: > I think what you are missing is that the standard Python idiom for this > use case is "if self._some_array is None:". This will continue to work, > regardless of whether the object being checked is an ndarray or any > other Python object. T

Re: [Numpy-discussion] Numpy 'None' comparison FutureWarning

2014-09-21 Thread Benjamin Root
That being said, I do wonder about related situations where the lhs of the equal sign might be an array, or it might be a None and you are comparing against another numpy array. In those situations, you aren't trying to compare against None, you are just checking if two objects are equivalent. Wh

Re: [Numpy-discussion] Custom dtypes without C -- or, a standard ndarray-like type

2014-09-21 Thread Charles R Harris
On Sun, Sep 21, 2014 at 5:50 PM, Stephan Hoyer wrote: > pandas has some hacks to support custom types of data for which numpy > can't handle well enough or at all. Examples include datetime and > Categorical [1], and others like GeoArray [2] that haven't make it into > pandas yet. > > Most of the

[Numpy-discussion] Custom dtypes without C -- or, a standard ndarray-like type

2014-09-21 Thread Stephan Hoyer
pandas has some hacks to support custom types of data for which numpy can't handle well enough or at all. Examples include datetime and Categorical [1], and others like GeoArray [2] that haven't make it into pandas yet. Most of these look like numpy arrays but with custom dtypes and type specific

Re: [Numpy-discussion] Numpy 'None' comparison FutureWarning

2014-09-21 Thread Eric Firing
On 2014/09/21, 11:10 AM, Demitri Muna wrote: > Hi, > > I just encountered the following in my code: > > FutureWarning: comparison to `None` will result in an elementwise object > comparison in the future. > > I'm very concerned about this. This is a very common programming pattern > (lazy loading):

[Numpy-discussion] Numpy 'None' comparison FutureWarning

2014-09-21 Thread Demitri Muna
Hi, I just encountered the following in my code: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future. I'm very concerned about this. This is a very common programming pattern (lazy loading): class A(object): def __init__(self): self._s