Re: [Numpy-discussion] State-of-the-art to use a C/C++ library from Python

2016-08-31 Thread Stefan van der Walt
On Wed, Aug 31, 2016, at 13:57, Jason Newton wrote: > Hey Ian - I hope I gave Cython a fair comment, but I have to add the > disclaimer that your capability to understand/implement those > solutions/workarounds in that project is greatly enhanced from your > knowing the innards of Cython from being

Re: [Numpy-discussion] Which NumPy/Numpy/numpy spelling?

2016-08-30 Thread Stefan van der Walt
On Mon, Aug 29, 2016, at 04:43, m...@telenczuk.pl wrote: > The documentation is not consistent and it mixes both NumPy and Numpy. > For example, the reference manual uses both spellings in the introduction > paragraph (http://docs.scipy.org/doc/numpy/reference/): > > "This reference manual det

[Numpy-discussion] Help wanted: implementation of 3D medial axis skeletonization

2015-11-06 Thread Stefan van der Walt
Hi all, I have been approached by a group that is interested in sponsoring the development of 3D skeletonization in scikit-image. One potential starting place would be: http://www.insight-journal.org/browse/publication/181 Is anyone interested in working on this? Please get in touch either on

Re: [Numpy-discussion] Fwd: Numpy for data manipulation

2015-10-01 Thread Stefan van der Walt
On 2015-10-01 11:46:59, Alex Rogozhnikov wrote: > Hi, I have written some numpy tips and tricks I am using, which may be > interesting to you. > This is quite long reading, so I've splitted it into two parts: > > http://arogozhnikov.github.io/2015/09/29/NumpyTipsAndTricks1.html > http://arogozhni

Re: [Numpy-discussion] ANN: Numpy 1.10.0rc1 released.

2015-09-24 Thread Stefan van der Walt
On 2015-09-24 00:17:33, Jens Jørgen Mortensen wrote: > jensj@jordan:~$ python > Python 2.7.9 (default, Apr 2 2015, 15:33:21) > [GCC 4.9.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import numpy as np > >>> a = np.zeros((2, 2, 2)) > >>> b = np.zero

Re: [Numpy-discussion] Tentative NumPy Tutorial inaccessible

2015-09-23 Thread Stefan van der Walt
On 2015-09-22 23:53:19, Nathaniel Smith wrote: > On Tue, Sep 22, 2015 at 10:58 PM, Andriy Yurchuk wrote: >> Hi! >> >> The Tentative NumPy Tutorial is no longer accessible by the URL >> http://wiki.scipy.org/Tentative_NumPy_Tutorial, it returns a 403. The link >> to this page is still on NumPy hom

Re: [Numpy-discussion] ANN: numtraits v0.2

2015-09-23 Thread Stefan van der Walt
On 2015-09-23 17:16:14, Nathaniel Smith wrote: >> This looks great! At the moment, a pip install tries to install a >> different version of NumPy, even though I already have the development >> version on my tree. > > FYI the alternative solution is to fix your local numpy install to > give pip an

Re: [Numpy-discussion] ANN: numtraits v0.2

2015-09-23 Thread Stefan van der Walt
Hi Thomas On 2015-09-23 09:39:00, Thomas Robitaille wrote: > We have released a small experimental package called numtraits that > builds on top of the traitlets package and provides a NumericalTrait > class that can be used to validate properties such as: This looks great! At the moment, a pip

Re: [Numpy-discussion] "Become an Open Source Contributor" workshop

2015-09-23 Thread Stefan van der Walt
Hi Jaime On 2015-09-23 14:06:08, Jaime Fernández del Río wrote: >3. If you have organized anything similar in the past, and have material >that I could use to, ahem, draw inspiration from, or recommendations to >make, or whatever, I'd love to hear from you. Here's the new developer w

Re: [Numpy-discussion] Governance model request

2015-09-23 Thread Stefan van der Walt
On 2015-09-23 13:36:35, Fernando Perez wrote: > On Wed, Sep 23, 2015 at 12:57 PM, Matthew Brett > wrote: > >> I see a severe reaction to perceived 'suspicion and innuendo', but I >> see no 'suspicion and innuendo'. Unless you mean that any suggestion >> of potential conflict of interest is suspi

Re: [Numpy-discussion] Governance model request

2015-09-22 Thread Stefan van der Walt
Hi Travis On 2015-09-22 03:44:12, Travis Oliphant wrote: > I'm actually offended that so many at BIDS seem eager to crucify my > intentions when I've done nothing but give away my time, my energy, my > resources, and my sleep to NumPy for many, many years.I guess if your > intent is to drive

Re: [Numpy-discussion] Governance model request

2015-09-22 Thread Stefan van der Walt
Hi Travis On 2015-09-21 23:29:12, Travis Oliphant wrote: > 1) nobody believes that the community should be forced to adopt numba as > part of ufunc core yet --- but this could happen someday just as Cython is > now being adopted but was proposed 8 years ago that it "could be adopted" > That's a

Re: [Numpy-discussion] Governance model request

2015-09-21 Thread Stefan van der Walt
Hi Brian On 2015-09-21 23:28:48, Bryan Van de Ven wrote: >> very hard to do. Currently, e.g., the community is not ready to adopt >> numba as part of the ufunc core. But it's been stated by some that, > > Who are you speaking for? The entire community? Under what mandate? I am speaking on beha

Re: [Numpy-discussion] Governance model request

2015-09-21 Thread Stefan van der Walt
On 2015-09-21 22:15:55, Bryan Van de Ven wrote: > Beyond that, what (even in a broad sense) is an example of a goal that > "Continuum might need" that would conceivably do detriment to the > NumPy community? That it be faster? Simpler to maintain? Easier to > extend? Integrate better with more OS

Re: [Numpy-discussion] Governance model request

2015-09-21 Thread Stefan van der Walt
On 2015-09-20 11:20:28, Travis Oliphant wrote: > I would recommend three possible adjustments to the steering council > concept. > > 1 - define a BDFL for the council. I would nominate chuck Harris > > 2 - limit the council to 3 people. I would nominate chuck, nathaniel, and > pauli. > > 3 - add

Re: [Numpy-discussion] Numpy FFT.FFT slow with certain samples

2015-08-28 Thread Stefan van der Walt
On 2015-08-28 16:20:33, Pierre-Andre Noel wrote: > If your sequence is not meant to be periodic (i.e., if after one > minute there is no reason why the signal should start back at > the beginning right away), then you should do zero-padding. And > while you zero-pad, you can zero-pad to a s

Re: [Numpy-discussion] Numpy FFT.FFT slow with certain samples

2015-08-28 Thread Stefan van der Walt
On 2015-08-28 11:51:47, Joseph Codadeen wrote: > my_1_minute_noise_with_gaps_truncated - Array len is > 2646070my_1_minute_noise_with_gaps - Array len is 2649674 In [6]: from sympy import factorint In [7]: max(factorint(2646070)) Out[7]: 367 In [8]: max(factorint(2649674)) Out[8]: 1324837

Re: [Numpy-discussion] Comments on governance proposal (was: Notes from the numpy dev meeting at scipy 2015)

2015-08-27 Thread Stefan van der Walt
Hi Sebastian On 2015-08-27 14:45:50, Sebastian Berg wrote: > Agreed. Are not PEP's/NEP's just that (and could possibly be > formalized more, not sure how much they are in the current > proposal) in some sense? Since they have a sponsor/author who > can be said to be assigned to it/responsibl

Re: [Numpy-discussion] Comments on governance proposal (was: Notes from the numpy dev meeting at scipy 2015)

2015-08-27 Thread Stefan van der Walt
On 2015-08-27 11:06:10, Matthew Brett wrote: > So, in the spirit of fruitful discussion, can I ask what y'all > consider to be the current problems with working on numpy (other > than the technical ones). What is numpy doing well, and what > is it doing badly? What risks do we have to plan f

Re: [Numpy-discussion] Comments on governance proposal (was: Notes from the numpy dev meeting at scipy 2015)

2015-08-26 Thread Stefan van der Walt
Hi Matthew On 2015-08-26 10:50:47, Matthew Brett wrote: > In short, the core structure seems to be characteristically > associated with a conservatism and lack of vision that causes > the project to stagnate. Can you describe how a democratic governance structure would look? It's not clear f

Re: [Numpy-discussion] Development workflow (not git tutorial)

2015-08-14 Thread Stefan van der Walt
On 2015-08-14 10:08:11, Benjamin Root wrote: > I should also note that there is currently an open issue with > "pip install -e" and namespace packages. This has been reported > to matplotlib with regards to mpl_toolkits. Essentially, if you > have namespace packages, it doesn't get installed co

Re: [Numpy-discussion] Development workflow (not git tutorial)

2015-08-13 Thread Stefan van der Walt
On 2015-08-13 08:52:22, Anne Archibald wrote: > My current approach is to build an empty virtualenv, pip install > nose, and from the numpy root directory do "python setup.py > build_ext --inplace" and "python -c 'import numpy; > numpy.test()'". This works, for my stock system python, though I

Re: [Numpy-discussion] Create a n-D grid; meshgrid alternative

2015-05-10 Thread Stefan van der Walt
On 2015-05-10 14:46:12, Jaime Fernández del Río wrote: > Isn't what you are trying to build a cartesian product function? > There is a neat, efficient implementation of such a function in > StackOverflow, by our own pv.: > > http://stackoverflow.com/questions/1208118/using-numpy-to-build-an-arr

Re: [Numpy-discussion] appveyor CI

2015-03-05 Thread Stefan van der Walt
Hi Chuck On 2015-03-05 10:09:08, Charles R Harris wrote: > Anyone familiar with appveyor ? Is > this something we could use to test/build numpy on windows > machines? It is free for open source. We already use this for scikit-image, and you are welcome to grab the s

[Numpy-discussion] ANN: scikit-image 0.11

2015-03-05 Thread Stefan van der Walt
rahan - Salvatore Scaramuzzino - Phil Schaf - Johannes Schönberger - Tim Seifert - Arve Seljebu - Steven Silvester - Julian Taylor - Matěj Týč - Alexey Umnov - Pratap Vardhan - Stefan van der Walt - Joshua Warner - Tony S Yu ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Context manager for seterr

2014-12-14 Thread Stefan van der Walt
On 2014-12-15 02:23:18, Julian Taylor wrote: > already exists as np.errstate: > > with np.errstate(divide='ignore'): With 'ignore' a warning is still raised--is this by choice? >>> import numpy as np >>> x = np.array([0, 1, 2.]) >>> with np.errstate(divide='ignore'): ... x/x ... __main__:2:

Re: [Numpy-discussion] Context manager for seterr

2014-12-14 Thread Stefan van der Walt
On 2014-12-15 02:23:18, Julian Taylor wrote: > with np.errstate(divide='ignore'): Perfect, thanks! Stéfan ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Context manager for seterr

2014-12-14 Thread Stefan van der Walt
Hi all, Since the topic of context managers recently came up, what do you think of adding a context manager for seterr? with np.seterr(divide='ignore'): frac = num / denom Stéfan ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://m

Re: [Numpy-discussion] slicing an n-dimensional array

2014-12-04 Thread Stefan van der Walt
On 2014-12-04 03:41:35, Jaime Fernández del Río wrote: > nx = np.arange(A.shape[0])[:, np.newaxis] > ny = np.arange(A.shape[1]) > C = A[nx, ny, B] That's the correct answer--in my answer I essentially wrote C = A[B] (== A[B, :, :]) which broadcasts the shape of B against the second and third di

Re: [Numpy-discussion] slicing an n-dimensional array

2014-12-03 Thread Stefan van der Walt
Hi Catherine On 2014-12-04 01:12:30, Moroney, Catherine M (398E) wrote: > I have an array "A" of shape (NX, NY, NZ), and then I have a second array "B" > of shape (NX, NY) > that ranges from 0 to NZ in value. > > I want to create a third array "C" of shape (NX, NY) that holds the > "B"-th slice

Re: [Numpy-discussion] Initializing array from buffer

2014-11-17 Thread Stefan van der Walt
Hi Andrea On 2014-11-16 19:42:09, Andrea Arteaga wrote: > My use case is the following: we have a some 3D arrays in our C++ > framework. The ordering of the elements in these arrays is neither C nor > Fortran style: it might be IJK (i.e. C style, 3rd dimension contiguous in > memory), KJI (i.e. F

Re: [Numpy-discussion] FFT of 2D array along last axis

2014-11-06 Thread Stefan van der Walt
Hi Brad On 2014-11-07 00:51:02, Brad Buran wrote: > On Windows 7 using Anaconda with numpy 1.9.1 I get False (indicating that > the FFT is not treating each row separately). When I test on a Ubuntu box > using numpy 1.9.1 I get True. Is this expected behavior? If I understand > the documentati

Re: [Numpy-discussion] median filtering a masked array

2014-11-06 Thread Stefan van der Walt
On 2014-11-06 11:10:29, Daπid wrote: > On 5 November 2014 19:11, Moroney, Catherine M (398E) > wrote: >> What is the recommended way of doing a fast median filter on an array where >> only >> certain elements of the array need to be calculated? I'm trying to avoid a >> nested loop over all (I,J

Re: [Numpy-discussion] FFTS for numpy's FFTs (was: Re: Choosing between NumPy and SciPy functions)

2014-10-28 Thread Stefan van der Walt
On 2014-10-28 19:55:57, Daniele Nicolodi wrote: > On 28/10/14 18:44, Stefan van der Walt wrote: >> On 2014-10-28 19:37:17, Daniele Nicolodi wrote: >>> On 28/10/14 16:50, David Cournapeau wrote: >>>> Nothing impossible (looks like Sony at least uses this code on wi

Re: [Numpy-discussion] FFTS for numpy's FFTs (was: Re: Choosing between NumPy and SciPy functions)

2014-10-28 Thread Stefan van der Walt
On 2014-10-28 19:37:17, Daniele Nicolodi wrote: > On 28/10/14 16:50, David Cournapeau wrote: >> Nothing impossible (looks like Sony at least uses this code on windows: >> https://github.com/anthonix/ffts/issues/27#issuecomment-40204403), but >> not a 2 hours thing either. > > One of the downsides

Re: [Numpy-discussion] Choosing between NumPy and SciPy functions

2014-10-28 Thread Stefan van der Walt
Hi Michael On 2014-10-27 15:26:58, D. Michael McFarland wrote: > What I would like to ask about is the situation this illustrates, where > both NumPy and SciPy provide similar functionality (sometimes identical, > to judge by the documentation). Is there some guidance on which is to > be preferr

Re: [Numpy-discussion] higher accuracy in diagonialzation

2014-10-27 Thread Stefan van der Walt
On 2014-10-27 10:37:58, Sunghwan Choi wrote: > I am now diagonalizing a 200-by-200 symmetric matrix. But the two methods, > scipy.linalg.eigh and numpy.linalg.eigh give significantly different result. > The results from two methods are different within 10^-4 order. One of them > is inaccurate or b

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-12 Thread Stefan van der Walt
Hi Warren On 2014-10-12 00:51:56, Warren Weckesser wrote: > A small wart in this API is the meaning of > > shuffle(a, independent=False, axis=None) > > It could be argued that the correct behavior is to leave the > array unchanged. I like the suggested changes. Since "independent" loses its m

Re: [Numpy-discussion] numpy 1.9b1 bug in pad function?

2014-06-14 Thread Stefan van der Walt
On 2014-06-14 14:40:29, Nadav Horesh wrote: > TypeError: pad() missing 1 required positional argument: 'pad_width' I've added a PR here for further discussion: https://github.com/numpy/numpy/pull/4808 Stéfan ___ NumPy-Discussion mailing list NumPy-Dis

Re: [Numpy-discussion] numpy 1.9b1 bug in pad function?

2014-06-14 Thread Stefan van der Walt
On 2014-06-14 14:40:29, Nadav Horesh wrote: > This is most likely a documentation error since: > > In [7]: np.pad(a) > --- > TypeError Traceback (most recent call last) > in () > > 1 np.pad

Re: [Numpy-discussion] Medians that ignore values

2008-09-19 Thread Stefan Van der Walt
On 19 Sep 2008, at 16:07 , Alan G Isaac wrote: > On 9/19/2008 4:35 AM David Cournapeau apparently wrote: >> I never use NaN as missing value > > What do you use? Masked arrays. Using NaN's for missing values is dangerous. You may do some operation, which generates invalid results, and then you

Re: [Numpy-discussion] change memmap.sync function

2008-02-22 Thread Stefan van der Walt
On Thu, Feb 21, 2008 at 04:17:26PM -0800, Christopher Burns wrote: > Would anyone oppose deprecating the memmap.sync function and replacing > it with memmap.flush? This would match python's mmap module, and I > think be more intuitive. I made the change in http://projects.scipy.org/scipy/numpy/c

Re: [Numpy-discussion] matrix wart

2008-02-22 Thread Stefan van der Walt
>>> M[0] > >> matrix([[1, 2]]) > >> >>> M[0][0] > >> matrix([[1, 2]]) > > > On Fri, 22 Feb 2008, Stefan van der Walt apparently wrote: > > This is exactly what I would expect for matrices: M[0] is > > the first row of th

Re: [Numpy-discussion] Matching 0-d arrays and NumPy scalars

2008-02-21 Thread Stefan van der Walt
Hi Travis, On Wed, Feb 20, 2008 at 10:14:07PM -0600, Travis E. Oliphant wrote: > In writing some generic code, I've encountered situations where it would > reduce code complexity to allow NumPy scalars to be "indexed" in the > same number of limited ways, that 0-d arrays support. > > > For examp

Re: [Numpy-discussion] Matching 0-d arrays and NumPy scalars

2008-02-21 Thread Stefan van der Walt
On Thu, Feb 21, 2008 at 12:08:32PM -0500, Alan G Isaac wrote: > On Thu, 21 Feb 2008, Konrad Hinsen apparently wrote: > > > What I see as more fundamental is the behaviour of Python container > > objects (lists, sets, etc.). If you add an object to a container and > > then access it as an element

Re: [Numpy-discussion] Rename record array fields

2008-02-20 Thread Stefan van der Walt
Hi Sameer On Wed, Feb 20, 2008 at 03:10:16PM -0600, Sameer DCosta wrote: > Is there a way to rename record array fields without making a copy of > the whole record array? > > Thanks in advance for your replies. Simply view the array as a new dtype: In [2]: x Out[2]: array([(1, 2), (3, 4)],

Re: [Numpy-discussion] partial_sum/adj_difference?

2008-02-20 Thread Stefan van der Walt
On Tue, Feb 19, 2008 at 05:36:52PM -0700, Charles R Harris wrote: > On Feb 19, 2008 2:20 PM, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > > On Tue, Feb 19, 2008 at 01:50:04PM -0700, Charles R Harris wrote: > > And here I thought you were going to fix that. Deleti

Re: [Numpy-discussion] partial_sum/adj_difference?

2008-02-19 Thread Stefan van der Walt
On Tue, Feb 19, 2008 at 01:50:04PM -0700, Charles R Harris wrote: > And here I thought you were going to fix that. Deleting the "blahs" isn't a > fix, it's a coverup. Now there is no extended documentation at all. I wouldn't call "Blah, blah" extended documentation -- in fact, I would've been rath

Re: [Numpy-discussion] partial_sum/adj_difference?

2008-02-19 Thread Stefan van der Walt
Hi Neal On Tue, Feb 19, 2008 at 01:38:06PM -0500, Neal Becker wrote: > Does numpy/scipy have a partial_sum and adj_difference function? > > partial_sum[i] = \sum_{j=0}^{i} x[j] numpy.cumsum Yikes, the docstring contains "Blah, blah". I'll fix that immediately. > adj_diff[i] = x[i] - x[i-1] :

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Stefan van der Walt
On Fri, Feb 15, 2008 at 08:28:08AM -0500, Alexander Michael wrote: > On Fri, Feb 15, 2008 at 7:12 AM, Stefan van der Walt <[EMAIL PROTECTED]> > wrote: > > As far as I know, the reference count to the array is increased when > > you create a view, but the views th

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Stefan van der Walt
Hi Alexander On Thu, Feb 14, 2008 at 03:43:46PM -0500, Alexander Michael wrote: > Is there a way to list all of the arrays that are referencing a given > array? Similarly, is there a way to get a list of all arrays that are > currently in memory? As far as I know, the reference count to the array

Re: [Numpy-discussion] test failures

2008-02-14 Thread Stefan van der Walt
Hi Charles On Wed, Feb 13, 2008 at 03:39:53PM -0700, Charles R Harris wrote: > I believe these come from your latest commit. My changeset is here: http://projects.scipy.org/scipy/numpy/changeset/4800 I don't see how that would have broken the tests you listed. Regards Stéfan __

Re: [Numpy-discussion] segfault problem with numpy and pickle

2008-01-24 Thread Stefan van der Walt
Hi David On Thu, Jan 24, 2008 at 01:18:45PM -0700, David Bolme wrote: > A am having some trouble when pickling numpy arrays. Basically I use one > python script to create the array and then pickle it. When I load the pickled > array using a different python script it appears to load fine. When

Re: [Numpy-discussion] numpy.ma.compress

2008-01-24 Thread Stefan van der Walt
Hi Pierre On Thu, Jan 24, 2008 at 04:58:04AM -0500, Pierre GM wrote: > On Thursday 24 January 2008 04:02:52 Stefan van der Walt wrote: > > I'm not 100% sure about the new behaviour -- compress now removes > > masked elements, instead of ignoring them. Whereas a person would &

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Stefan van der Walt
Hi Robert On Thu, Jan 24, 2008 at 01:15:13PM -0600, Robert Kern wrote: > >> 5. Is the {'hi', 'ho'} syntax used when a parameter can only assume a > >> limited number of values? In Python {} is a dictionary, so why not > >> use ('hi','ho') instead? > >> > >> Either would be fine. I

Re: [Numpy-discussion] [ANN] numscons 0.3.0 release

2008-01-24 Thread Stefan van der Walt
Hi David On Thu, Jan 24, 2008 at 12:34:56AM +0900, David Cournapeau wrote: > I've just released the 0.3.0 release of numscons, an alternative > build system for numpy. The tarballs are available on launchpad. > > https://launchpad.net/numpy.scons.support/0.3/0.3.0 > > To use it, you need to

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Stefan van der Walt
Hi Charles On Wed, Jan 23, 2008 at 09:34:44AM -0700, Charles R Harris wrote: > 2. How do we specify default values? > > I like to put them first in the list: {-1, integer} When exactly is this list used? That should be made clear in the standard as well. > 3. Why do we need the "option

Re: [Numpy-discussion] numpy.ma.compress

2008-01-24 Thread Stefan van der Walt
Hi Pierre On Wed, Jan 23, 2008 at 08:45:26PM -0500, Pierre GM wrote: > All, > I just committed a fix on the SVN. Now, the axis keyword should be recognized. > Sorry for the delay. I'm not 100% sure about the new behaviour -- compress now removes masked elements, instead of ignoring them. Whereas

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Stefan van der Walt
Hi Eric, On Wed, Jan 23, 2008 at 11:17:51AM -1000, Eric Firing wrote: > Pierre, > > numpy.compress exists, but numpy.ma.compress does not; is this > intentional? Thanks for the report. I added a simple implementation to SVN for the time being. Regards Stéfan ___

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Stefan van der Walt
On Wed, Jan 23, 2008 at 11:17:51AM -1000, Eric Firing wrote: > Pierre, > > numpy.compress exists, but numpy.ma.compress does not; is this > intentional? Looks like x.compress exists, but it doesn't work as expected: x = N.ma.array([1,2,3],mask=[True,False,Fals]) x.compress(x<2) throws ValueErr

[Numpy-discussion] Docstring standard: how to specify variable types

2008-01-23 Thread Stefan van der Walt
Hi all, The numpy documentation standard example shows: Parameters -- var1 : array_like Array_like means all those objects -- lists, nested lists, etc. -- that can be converted to an array. var2 : integer Write out the full type long_variable_na

Re: [Numpy-discussion] location of ma in maskedarray branch

2008-01-23 Thread Stefan van der Walt
Hi Matt On Tue, Jan 22, 2008 at 10:37:29PM -0500, Matt Knox wrote: > I noticed that the new masked array module resides in numpy/ma in the > maskedarray branch as opposed to numpy/core/ma like it does in the current > trunk. Was this intentional? Code that explicitly imports ma from the core > s

Re: [Numpy-discussion] data type specifications

2008-01-22 Thread Stefan van der Walt
Hi Gary On Tue, Jan 22, 2008 at 11:18:01AM -0500, Gary Pajer wrote: > Occasionally I find myself poking into docstrings and googling > randomly trying to find the proper way to specify a data type, or > trying to remind myself just what a "float" is. I can never find the > info easily. > > Pref

Re: [Numpy-discussion] Building a static libnumpy

2008-01-22 Thread Stefan van der Walt
On Tue, Jan 22, 2008 at 05:12:32PM +0900, David Cournapeau wrote: > On Jan 22, 2008 3:44 PM, Jussi Enkovaara <[EMAIL PROTECTED]> wrote: > > Hi, > > I need to use numpy in an environment which does not support shared > > libraries. > > Previously, I have used the old Numeric where I created a Makef

Re: [Numpy-discussion] maskedarray bug?

2008-01-22 Thread Stefan van der Walt
Hi Pierre, Eric On Mon, Jan 21, 2008 at 03:35:37PM -0500, Pierre GM wrote: > Yep, bug indeed. Thanks for pointing that out ! > The following patch should take care of the problem. (In short, a getmask > function was used instead of getmaskarray). > Note that the patch takes also into account ele

Re: [Numpy-discussion] r4730 broke numpy in maskedarray branch

2008-01-20 Thread Stefan van der Walt
Hi Eric Sorry for the inconvenience -- I applied Pierre's patch. Thanks, Stéfan On Sat, Jan 19, 2008 at 11:25:02AM -1000, Eric Firing wrote: > Stefan, > > The renaming of concatenator to AxisConcatenator in r4730 in the maskedaray > branch needs to be propagated into ma/extras.py; I don't know

Re: [Numpy-discussion] maskedarray branch

2008-01-18 Thread Stefan van der Walt
Hi David On Fri, Jan 18, 2008 at 10:53:28AM -0500, David Huard wrote: > Stefan, > It seems that the current maskedarray branch is not compatible with the > current > scipy trunk. Would you mind expanding on that? Thanks Stéfan ___ Numpy-discussion mai

Re: [Numpy-discussion] maskedarray branch

2008-01-17 Thread Stefan van der Walt
Hi David On Tue, Jan 15, 2008 at 04:29:22PM -0500, David Huard wrote: > I am trying to install the maskedarray numpy branch for use with the > timeseries > package and I get the following error when importing numpy: Before I try to find the problem: did you remove the previous numpy installation

Re: [Numpy-discussion] subclassing matrix

2008-01-12 Thread Stefan van der Walt
On Sat, Jan 12, 2008 at 01:24:31PM -0800, Basilisk96 wrote: [...] > When is __array_finalize__ called? By adding some print traces, I can > see it's called every time an array is modified in any way i.e., > reshaped, transposed, etc., and also during operations like u+v, u-v, > A*u. But it's not

Re: [Numpy-discussion] Setting WRITEABLE flag on array scalar

2008-01-10 Thread Stefan van der Walt
Hi, On Thu, Jan 10, 2008 at 10:21:28AM -0600, Travis E. Oliphant wrote: > You can't do it, because there is no place for the information to go. > The array scalars are always read-only anyway. So, there should be no > reason to set this flag. Right, I was confused because I saw: In [1]: x =

[Numpy-discussion] Setting WRITEABLE flag on array scalar

2008-01-10 Thread Stefan van der Walt
Hi all, We currently use an array scalar of value False as the mask in MaskedArray. I would like to make sure that the mask value cannot be modified, but when I try import numpy as np x = np.bool_(False) x.flags['WRITEABLE'] = False I am warned that you "Cannot set flags on array scalars.". Is

Re: [Numpy-discussion] branches/maskedarray patch + lost password

2008-01-05 Thread Stefan van der Walt
Hi Pierre On Fri, Jan 04, 2008 at 04:30:47PM -0500, Pierre GM wrote: > Here's a patch to the current version of svn/numpy/branches/maskedarray, that > corrects several bugs. Those tests at the end of core.py should be included in the test suite before we commit (otherwise they won't be ran by nu

Re: [Numpy-discussion] Moving away from svn ?

2008-01-05 Thread Stefan van der Walt
On Sat, Jan 05, 2008 at 03:00:21PM -0600, Travis E. Oliphant wrote: > I suspect there are others with serious reservations about jumping off > of SVN just now (just when a lot of people have finally figured out how > to use it). I recall something you said to David last week, regarding merges wi

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
On Fri, Jan 04, 2008 at 07:45:06PM +0100, Ondrej Certik wrote: > Charles actually said another point in favor of Mercurial - it works > on Windows (at least people say so), while git not that much (at least > people say so). I never use Windows myself, so I don't know. Note that bzr also runs unde

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
Hi David On Fri, Jan 04, 2008 at 08:24:04PM +0900, David Cournapeau wrote: > Having recently felt the pain to use subversion merge, I was [...] Also take a look at https://launchpad.net/pqm I don't know why we haven't set up a hook like this a long time ago in SVN, it just makes so much

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
Hi David On Fri, Jan 04, 2008 at 08:24:04PM +0900, David Cournapeau wrote: > First things first, happy new year to all ! Happy new year! It's been great so far :) > Having recently felt the pain to use subversion merge, I was > wondering about people's feeling on moving away from subve

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Stefan van der Walt
Hi Matthieu On Fri, Jan 04, 2008 at 03:26:52PM +0100, Matthieu Brucher wrote: > Beside this, I'm starting to use bazaar (in fact it's the successor of arch) > for a small project of mine hosted on launchpad.net, and it works > great. As Note that bzr refers to bazaar-ng (new generation), which is

[Numpy-discussion] Numpy code coverage

2008-01-02 Thread Stefan van der Walt
Hi all, I read about Titus Brown's Figleaf code coverage tool [1] on the Planet SciPy aggregator [2]. The results of running figleaf on the numpy test-suite [3] covers Python code only. What the best way of discovering the C and C++ code coverage as well? Regards Stéfan [1] http://darcs.idyll.

Re: [Numpy-discussion] planet.scipy.org

2008-01-02 Thread Stefan van der Walt
Hi Jarrod On Mon, Dec 31, 2007 at 02:43:37PM -0800, Jarrod Millman wrote: > I just wanted to announce that we now have a NumPy/SciPy blog > aggregator thanks to Gaël Varoquaux: http://planet.scipy.org/ > > Feel free to contact me if you have a blog that you would like > included. Great, thanks!

Re: [Numpy-discussion] [SciPy-dev] Doc-day

2007-12-28 Thread Stefan van der Walt
On Fri, Dec 28, 2007 at 11:32:03AM -0600, Travis E. Oliphant wrote: > I don't see the point in every file having a __docformat__ line, when > our documentaion formatting tool should already know the standard we are > using is. It's just more cruft. Besides the PEP was rejected, so I > don't

Re: [Numpy-discussion] [SciPy-dev] Doc-day

2007-12-28 Thread Stefan van der Walt
On Thu, Dec 27, 2007 at 09:27:09PM -0800, Jarrod Millman wrote: > On Dec 27, 2007 7:42 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > > Doc-day will start tomorrow (in about 12 hours). It will be Friday for > > much of America and be moving into Saturday for Europe and Asia. Join > > in on t

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-22 Thread Stefan van der Walt
Hi Eric On Fri, Dec 21, 2007 at 08:13:13AM -1000, Eric Firing wrote: > I think the description of the putmask difference is missing the point. > The real difference is not in the way the third argument is handled, > or its required shape, but in whether the mask is updated or not. This behav

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-21 Thread Stefan van der Walt
On Thu, Dec 20, 2007 at 06:52:38PM -0500, Pierre GM wrote: > > If we can document exactly what the compatibility issues are (and it > > looks like we are almost there), we should move forward. > > OK, I'll take care of that this week-end. Stefan, feel free to beat me to > it... A first draft is

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-21 Thread Stefan van der Walt
On Fri, Dec 21, 2007 at 10:43:28AM +0200, Stefan van der Walt wrote: > On Thu, Dec 20, 2007 at 05:24:44PM -0600, Travis E. Oliphant wrote: > > > * bool(x) raises a ValueError, as it does for ndarrays. > > > > > What does bool(x) raise for numpy.core.ma. Sorry, I rea

Re: [Numpy-discussion] [SciPy-dev] SciPy Sprint results

2007-12-21 Thread Stefan van der Walt
Hi Travis On Thu, Dec 20, 2007 at 05:24:44PM -0600, Travis E. Oliphant wrote: > > * bool(x) raises a ValueError, as it does for ndarrays. > > > What does bool(x) raise for numpy.core.ma. It now behaves the same way as numpy does, raising a ValueError: In [1]: bool(N.ma.array([0,1])) -

Re: [Numpy-discussion] Faster array version of ndindex

2007-12-14 Thread Stefan van der Walt
Hi Sebastian N.fromiter only works on 1D arrays. I thought the following may work, but it doesn't: np.fromiter(np.ndindex(10,10,10),N.dtype((int,3))) This kind of loop is probably best implemented in C, although I think Jonathan's version is rather clever. Regards Stéfan On Fri, Dec 14, 2007

Re: [Numpy-discussion] Propose modification to binary_repr

2007-12-13 Thread Stefan van der Walt
On Thu, Dec 13, 2007 at 02:33:01PM -0500, David Huard wrote: > Change done. > > All tests pass. Now's a good time to fix that :) Cheers Stéfan ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] resize in old Numeric

2007-12-12 Thread Stefan van der Walt
Hi Christiaan On Wed, Dec 12, 2007 at 07:39:49PM +0100, Christian Meesters wrote: > I need to flatten a simple 3x3 array and try to do that with resize. > First time works, next time it doesn't. Here is an example: > > In [1]: from Numeric import * > > In [2]: a = array([[ 0.50622966, -0.5476438

Re: [Numpy-discussion] numpy large arrays?

2007-12-12 Thread Stefan van der Walt
On Wed, Dec 12, 2007 at 03:29:57PM +0100, Søren Dyrsting wrote: > I need to perform computations involving large arrays. A lot of rows and no > more than e.g. 34 columns. My first choice is python/numpy because I'm already > used to code in matlab. > > However I'm experiencing memory problems even

Re: [Numpy-discussion] Missing file in SVN repository (test_ufunc)

2007-12-04 Thread Stefan van der Walt
On Tue, Dec 04, 2007 at 08:13:56PM +0900, David Cournapeau wrote: > Since revision 4528, it is not possible to run the tests for > numpy.core, because of a missing file, test_ufunc.py. Since the change > in the test was done in r4528 whose log refers " increase of code > coverage", I guess t

Re: [Numpy-discussion] display numpy array as image

2007-12-03 Thread Stefan van der Walt
like GL > or wx will be best suited here, I think? (I presume that python/numpy/ > [GL|wx] can keep up with things like dragging a slider to change > brightness/contrast/other LUT changes, as long as I code reasonably.) > > Anyhow, thanks for all the input, > > Zach "

Re: [Numpy-discussion] How can I constrain linear_least_squares to integer solutions?

2007-11-28 Thread Stefan van der Walt
On Tue, Nov 27, 2007 at 11:07:30PM -0700, Charles R Harris wrote: > This is not a trivial problem, as you can see by googling mixed integer least > squares (MILS). Much will depend on the nature of the parameters, the number > of > variables you are using in the fit, and how exact the solution nee

Re: [Numpy-discussion] "moving window" in numpy

2007-11-26 Thread Stefan van der Walt
Hi Matthew On Sun, Nov 25, 2007 at 05:00:48PM -0800, Matthew Perry wrote: > I'm not sure if my terminology is familiar but I'm trying to do a > "moving window" analysis (ie a spatial filter or kernel) on a 2-D > array representing elevation. For example, a 3x3 window centered on > each cell is us

Re: [Numpy-discussion] OT: A Way to Approximate and Compress a 3D Surface

2007-11-23 Thread Stefan van der Walt
On Fri, Nov 23, 2007 at 10:19:47AM -0600, Geoffrey Zhu wrote: > One thing about triangulation I haven't figured out is how to add > multiple such functions together. So if I have a set of triangles that > represent f1(x,y) and another set of triangles that represent f2(x,y), > is there any quick wa

Re: [Numpy-discussion] my derived ndarray class object loses its attribute after a transpose()

2007-11-23 Thread Stefan van der Walt
Hi Sebastian On Fri, Nov 23, 2007 at 09:25:37AM +0100, Sebastian Haase wrote: > Hi, > this question might habe been answered before: > I have my own ndarray-derived class. I did this, so that I can add > another "custom attribute" -- let's say > arr.filename > All works very except, except when I

[Numpy-discussion] freebsd patch

2007-11-23 Thread Stefan van der Walt
Hi all, Ticket 618 [1] proposes a patch to make numpy pass all tests on FreeBSD. Would anyone familiar with FreeBSD please glance over the patch, apply it and make sure that it works as intended? Thanks Stéfan [1] http://scipy.org/scipy/numpy/ticket/618 _

Re: [Numpy-discussion] Patch for numpy.i (not C89 compliant)

2007-11-23 Thread Stefan van der Walt
On Fri, Nov 23, 2007 at 10:24:07AM +0100, Matthieu Brucher wrote: > I submitted a ticket and then a patch for numpy.i > (http://projects.scipy.org/scipy/numpy/ticket/620). the problem is > that some typemaps use a C99 syntax whereas most C compiler still are > only C89 compliant (mainly Visual Stud

Re: [Numpy-discussion] SegFault/double free with simple array mask operation

2007-11-18 Thread Stefan van der Walt
On Sun, Nov 18, 2007 at 11:18:10AM -1000, Eric Firing wrote: > Ticket #607 should be closed now also. It looks like I can't do that, > even though I created the ticket. > > I'm not sure whether it was the fix for #614 that did it, or whether it > is the code it referred to, but now a proper exc

Re: [Numpy-discussion] SegFault/double free with simple array mask operation

2007-11-18 Thread Stefan van der Walt
On Sat, Nov 17, 2007 at 12:55:57PM +0100, Achim Gaedke wrote: > Achim Gaedke wrote: > > David Cournapeau wrote: > > > >> Could you open a ticket on the numpy trac system ? (I can confirm the bug) > >> > >> cheers, > >> > >> David > >> > >> > > It is Ticket #614 . The version information

Re: [Numpy-discussion] Bug in arange dtype ">f" was: Using arr.dtype.type to check byteorder-independed dtype fails for bool

2007-11-17 Thread Stefan van der Walt
On Tue, Nov 13, 2007 at 02:53:32PM +0100, Sebastian Haase wrote: > On Nov 13, 2007 2:18 PM, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > > Hi Sebastian > > > > On Tue, Nov 13, 2007 at 01:11:33PM +0100, Sebastian Haase wrote: > > > Hi, > > > I need

  1   2   3   >