Re: [Numpy-discussion] Distutils issue? [migrated]

2010-01-29 Thread Robert Kern
On Fri, Jan 29, 2010 at 18:18, Tom Davis wrote: > [This thread has been migrated from distutils-sig until such a time that it > can be determined if this is a distutils or numpy issue] > A quick recap: Basically, trying to > fix http://projects.scipy.org/numpy/ticket/999 along with some duplicates

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 2:58 PM, David Huard wrote: > For the record, here is what I came up with. > > import numpy as np > > def expand_ellipsis(index, ndim): >    """Replace the ellipsis, real or implied, of an index expression by slices. > >    Parameters >    -- >    index : tuple >  

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 2:58 PM, David Huard wrote: > For the record, here is what I came up with. > > import numpy as np > > def expand_ellipsis(index, ndim): >    """Replace the ellipsis, real or implied, of an index expression by slices. > >    Parameters >    -- >    index : tuple >  

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread David Huard
For the record, here is what I came up with. import numpy as np def expand_ellipsis(index, ndim): """Replace the ellipsis, real or implied, of an index expression by slices. Parameters -- index : tuple Indexing expression. ndim : int Number of dimensions o

Re: [Numpy-discussion] Warning on http://scipy.org/ about binary incompatibility ?

2010-01-29 Thread David Huard
I'm a heavy user of scikits.timeseries so I am very interested in having native datetime objects in Numpy. However, when I did play with it about a week ago. I found inconsistencies between the actual code and the NEP. The "Example of use" section mostly doesn't work. I understand the need to put

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 1:03 PM, Keith Goodman wrote: > On Fri, Jan 29, 2010 at 9:53 AM,   wrote: >> I forgot about ellipsis, since I never use them, >> replace ellipsis by [slice(None)]*ndim or something like this >> >> I don't know how to access an ellipsis directly, is it even possible >> to co

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 12:32 PM, David Huard wrote: > On Fri, Jan 29, 2010 at 12:10 PM,   wrote: >> On Fri, Jan 29, 2010 at 11:49 AM, David Huard wrote: >>> Hi, >>> >>> I have a 4D "array" with a given shape, but the array is never >>> actually created since it is large and distributed over mult

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread Keith Goodman
On Fri, Jan 29, 2010 at 9:53 AM, wrote: > I forgot about ellipsis, since I never use them, > replace ellipsis by [slice(None)]*ndim or something like this > > I don't know how to access an ellipsis directly, is it even possible > to construct an index list that contains an ellipsis? > There is an

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 12:48 PM, wrote: > On Fri, Jan 29, 2010 at 12:32 PM, David Huard wrote: >> On Fri, Jan 29, 2010 at 12:10 PM,   wrote: >>> On Fri, Jan 29, 2010 at 11:49 AM, David Huard wrote: Hi, I have a 4D "array" with a given shape, but the array is never actually

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 12:32 PM, David Huard wrote: > On Fri, Jan 29, 2010 at 12:10 PM,   wrote: >> On Fri, Jan 29, 2010 at 11:49 AM, David Huard wrote: >>> Hi, >>> >>> I have a 4D "array" with a given shape, but the array is never >>> actually created since it is large and distributed over mult

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread David Huard
On Fri, Jan 29, 2010 at 12:10 PM, wrote: > On Fri, Jan 29, 2010 at 11:49 AM, David Huard wrote: >> Hi, >> >> I have a 4D "array" with a given shape, but the array is never >> actually created since it is large and distributed over multiple >> binary files. Typical usage would be to take slices a

Re: [Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread josef . pktd
On Fri, Jan 29, 2010 at 11:49 AM, David Huard wrote: > Hi, > > I have a 4D "array" with a given shape, but the array is never > actually created since it is large and distributed over multiple > binary files. Typical usage would be to take slices across the 4D > array. > > I'd like to know what th

[Numpy-discussion] How to get the shape of an array slice without doing it

2010-01-29 Thread David Huard
Hi, I have a 4D "array" with a given shape, but the array is never actually created since it is large and distributed over multiple binary files. Typical usage would be to take slices across the 4D array. I'd like to know what the shape of the resulting array would be if I took a slice out of it.