Re: [Numpy-discussion] Test failures - which dependencies am I missing?

2012-05-01 Thread Keith Hughitt
Hi Chris, Try "sudo apt-get build-dep python-numpy" to install the dependencies for building NumPy. I believe it will install all of the optional dependencies as well. HTH, Keith ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.s

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-29 Thread Keith Hughitt
Ah. Thanks for catching that! Otherwise though I think everything looks pretty good. Thanks all, Keith On Thu, Sep 29, 2011 at 12:18 PM, Zachary Pincus wrote: > I think the remaining delta between the integer and float "boxcar" > smoothing is that the integer version (test 21) still uses median

[Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Keith Hughitt
Hi all, Myself and several colleagues have recently started work on a Python library for solar physics , in order to provide an alternative to the current mainstay for solar physics, which is written in IDL. One of the first steps we have ta

Re: [Numpy-discussion] Preventing an ndarray subclass from returning new subclass instances for std(), etc

2011-09-18 Thread Keith Hughitt
(aia).std() Out[16]: 292.43424704678557 Keith 2011/9/18 Stéfan van der Walt > On Sun, Sep 18, 2011 at 9:09 AM, Keith Hughitt > wrote: > > I'm sure it is simply a coding error on my part, but so far I havne't > been > > able to track it down. > > I don

[Numpy-discussion] Preventing an ndarray subclass from returning new subclass instances for std(), etc

2011-09-18 Thread Keith Hughitt
Hi all, For a ndarray-subclass I'm working on I extended the array_wrap and array_finalize functions so that operations like __sub__() would return a new instance of the subclass, instead of an ndarray (although I still hav

Re: [Numpy-discussion] Overriding numpy.ndarray.__getitem__?

2011-08-17 Thread Keith Hughitt
Wed, Aug 17, 2011 at 3:25 PM, Keith Hughitt wrote: > Hi all, > > I have a subclass of ndarray which is built using using a stack of images. > Rather than store the image header information separately, I overrode > __getitem__ so that when the user indexes into the image cube a s

[Numpy-discussion] Overriding numpy.ndarray.__getitem__?

2011-08-17 Thread Keith Hughitt
Hi all, I have a subclass of ndarray which is built using using a stack of images. Rather than store the image header information separately, I overrode __getitem__ so that when the user indexes into the image cube a single image a different object type (which includes the header information) is r

Re: [Numpy-discussion] Best way to construct/slice 3-dimensional ndarray from multiple 2d ndarrays?

2011-08-17 Thread Keith Hughitt
t the .base attribute; that is really useful. Thank you both for the feedback. Keith On Wed, Aug 17, 2011 at 1:46 PM, Aronne Merrelli wrote: > > > On Wed, Aug 17, 2011 at 9:04 AM, Keith Hughitt wrote: > >> >> Also, when subclassing ndarray and calling obj = data.view(cls) f

Re: [Numpy-discussion] Best way to construct/slice 3-dimensional ndarray from multiple 2d ndarrays?

2011-08-17 Thread Keith Hughitt
iews on this 3d array ("x_i = > cube[i]") to fill your 2D arrays in the same memory space. > > I can't help with your second question, sorry. > > -=- Olivier > > 2011/8/17 Keith Hughitt > >> Hi all, >> >> I have a method which builds a sin

[Numpy-discussion] Best way to construct/slice 3-dimensional ndarray from multiple 2d ndarrays?

2011-08-17 Thread Keith Hughitt
Hi all, I have a method which builds a single 3d ndarray from several equal-dimension 2d ndarrays, and another method which extracts the original 2d ndarrays back out from the 3d one. The way I'm doing this right now is pretty simple, e.g.: cube = np.asarray([arr1, arr2,...]) ... x = cube[0] I

[Numpy-discussion] Returning ndimage subclass instances from scipy methods?

2011-08-11 Thread Keith Hughitt
Hi all, Does anyone know if it is possible to have SciPy methods which work on/return ndarray instances return subclass instances instead? For example, I can pass in an instance of a ndarray subclass to methods in scipy.ndimage, but a normal ndarray is returned instead of a new subclass instance.