Re: [Numpy-discussion] type-casting inconsistency with timedelta64

2011-09-16 Thread Charles R Harris
On Fri, Sep 16, 2011 at 2:28 PM, Benjamin Root wrote: > Came across an oddity when experimenting with the datetime64 and > timedelta64 objects. > > a = np.zeros((10,), dtype='l') > b = np.datetime64('2010-12-20T14:23:56-0600') > c = np.datetime64('2010-12-20T21:27:09-0600') > > a[0:1] = c - b #

[Numpy-discussion] type-casting inconsistency with timedelta64

2011-09-16 Thread Benjamin Root
Came across an oddity when experimenting with the datetime64 and timedelta64 objects. a = np.zeros((10,), dtype='l') b = np.datetime64('2010-12-20T14:23:56-0600') c = np.datetime64('2010-12-20T21:27:09-0600') a[0:1] = c - b # This works fine a[0] = c - b # This does not The second assignm

Re: [Numpy-discussion] [ANN] glumpy 0.2.0

2011-09-16 Thread Samuel John
Hi Nicolas, that looks great. Could you make this available such that `pip install glumpy` would work? cheers, Samuel ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] [ANN] glumpy 0.2.0

2011-09-16 Thread Nicolas Rougier
Hi folks, I am pleased to announce a new release of glumpy, a small python library for the (very) fast vizualization of numpy arrays, (mainly two dimensional) that has been designed with efficiency in mind. If you want to draw nice figures for inclusion in a scientific article, you’d better us

Re: [Numpy-discussion] Difficulty using special types like timedelta and Decimal

2011-09-16 Thread Benjamin Root
On Fri, Sep 16, 2011 at 11:35 AM, Benjamin Root wrote: > > > On Friday, September 16, 2011, Charles R Harris > wrote: > > > > > > On Fri, Sep 16, 2011 at 9:11 AM, Benjamin Root wrote: > >> > >> Certain numerical types in Python that support accurate fractional > calculations such as timedelta a

Re: [Numpy-discussion] Difficulty using special types like timedelta and Decimal

2011-09-16 Thread Benjamin Root
On Friday, September 16, 2011, Charles R Harris wrote: > > > On Fri, Sep 16, 2011 at 9:11 AM, Benjamin Root wrote: >> >> Certain numerical types in Python that support accurate fractional calculations such as timedelta and Decimal do not allow for multiplication or division by a floating point nu

Re: [Numpy-discussion] Difficulty using special types like timedelta and Decimal

2011-09-16 Thread Charles R Harris
On Fri, Sep 16, 2011 at 9:11 AM, Benjamin Root wrote: > Certain numerical types in Python that support accurate fractional > calculations such as timedelta and Decimal do not allow for multiplication > or division by a floating point number, but do allow for use with an > integer. This can cause

Re: [Numpy-discussion] Indexing by label in 3rd dimension

2011-09-16 Thread Warren Weckesser
On Fri, Sep 16, 2011 at 10:18 AM, Benjamin Landenberger < benjamin.landenber...@imtek.uni-freiburg.de> wrote: > Hello list! > > I have an array *mask* of shape (a, b) and another array *intensities* > of shape (N, a, b), where the values in *mask* range from 0 to N-1. It > is somehow similar to la

Re: [Numpy-discussion] Indexing by label in 3rd dimension

2011-09-16 Thread Benjamin Root
On Friday, September 16, 2011, Benjamin Root wrote: > > > On Friday, September 16, 2011, Benjamin Landenberger < benjamin.landenber...@imtek.uni-freiburg.de> wrote: >> Hello list! >> >> I have an array *mask* of shape (a, b) and another array *intensities* >> of shape (N, a, b), where the values i

Re: [Numpy-discussion] Indexing by label in 3rd dimension

2011-09-16 Thread Benjamin Root
On Friday, September 16, 2011, Benjamin Landenberger < benjamin.landenber...@imtek.uni-freiburg.de> wrote: > Hello list! > > I have an array *mask* of shape (a, b) and another array *intensities* > of shape (N, a, b), where the values in *mask* range from 0 to N-1. It > is somehow similar to label

[Numpy-discussion] Indexing by label in 3rd dimension

2011-09-16 Thread Benjamin Landenberger
Hello list! I have an array *mask* of shape (a, b) and another array *intensities* of shape (N, a, b), where the values in *mask* range from 0 to N-1. It is somehow similar to label arrays in scipy.ndimage. Now I want to pick those entries from the first dimension of *intensities* which are given

[Numpy-discussion] Difficulty using special types like timedelta and Decimal

2011-09-16 Thread Benjamin Root
Certain numerical types in Python that support accurate fractional calculations such as timedelta and Decimal do not allow for multiplication or division by a floating point number, but do allow for use with an integer. This can cause difficulties with some functions such as np.gradient() which ha

Re: [Numpy-discussion] PyPy guys deserve some help on micronumpy from you, numpy gurus!

2011-09-16 Thread Peter
On Thu, Sep 15, 2011 at 11:34 AM, Peter wrote: > This may not be the best place to ask, but how should a > python script (e.g. setup.py) distinguish between real NumPy > and micronumpy? Or should I instead be looking to distinguish > PyPy versus another Python implementation? For anyone intereste