Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-08 Thread Stéfan van der Walt
On 7 April 2016 at 15:03, Stéfan van der Walt <stef...@berkeley.edu> wrote: > 4) x @ colvec(x) -- gives an error, but perhaps this should work and > be equivalent to np.dot(colvec(x), rowvec(x)) ? Sorry, that should have been 4) colvec(x)

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-07 Thread Stéfan van der Walt
On 7 April 2016 at 11:17, Chris Barker wrote: > np.col_vector(arr) > > which would be a synonym for np.reshape(arr, (-1,1)) > > would that make anyone happy? I'm curious to see use cases where this doesn't solve the problem. The most common operations that I run into:

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

2015-08-28 Thread Stéfan van der Walt
On Aug 28, 2015 5:17 PM, Pierre-Andre Noel noel.pierre.an...@gmail.com wrote: I had in mind the use of FFT to do convolutions ( https://en.wikipedia.org/wiki/Convolution_theorem ). If you do not zero-pad properly, then the end of the signal may bleed on the beginning, and vice versa. Ah,

Re: [Numpy-discussion] Changed behavior of np.gradient

2014-10-04 Thread Stéfan van der Walt
On Oct 4, 2014 10:14 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: +1 for an order=2 or maxorder=2 flag If you parameterize that flag, users will want to change its value (above two). Perhaps rather use a boolean flag such as second_order or high_order, unless it seems feasible

Re: [Numpy-discussion] Fwd: We need help working on code coverage for Cython code

2014-08-12 Thread Stéfan van der Walt
Hi Matthew On Tue, Aug 12, 2014 at 9:24 PM, Matthew Brett matthew.br...@gmail.com wrote: The Cython developers have done some work on this [1] but it is currently stalled for lack of developer time to work on it. It looks like we can help them with the rest of the work once the lnotab PR is

Re: [Numpy-discussion] Fwd: We need help working on code coverage for Cython code

2014-08-12 Thread Stéfan van der Walt
Hi Matthew On Tue, Aug 12, 2014 at 9:49 PM, Matthew Brett matthew.br...@gmail.com wrote: My very vague impression is that Stefan B thinks of the lnotab PR as part of the process of getting the work done, so that merging would only be worthwhile if it was pretty clear that the rest of the work

Re: [Numpy-discussion] Fwd: We need help working on code coverage for Cython code

2014-08-12 Thread Stéfan van der Walt
On Tue, Aug 12, 2014 at 10:15 PM, Matthew Brett matthew.br...@gmail.com wrote: The first step we thought of was having a group live conversation of some sort with the Cython developers to get an idea of what work needs doing. So, I think the first question is - who would be up for joining

Re: [Numpy-discussion] Inverted indices

2014-08-07 Thread Stéfan van der Walt
Hi Nicolas On Thu, Aug 7, 2014 at 1:16 PM, Nicolas P. Rougier nicolas.roug...@inria.fr wrote: Here is a small example: Z = [(0,0), (1,1), (2,2), (3,3), (4,4)) I = [0, 20, 23, 24, 37] S = [ 20,20,0,24] - Result should be [(1,1), (1,1), (0,0),(3,3)] S = [15,15] - Wrong (15 not in I) but

Re: [Numpy-discussion] Remove bento from numpy

2014-07-09 Thread Stéfan van der Walt
On Sat, Jul 5, 2014 at 6:40 PM, David Cournapeau courn...@gmail.com wrote: The efforts are on average less demanding than this discussion. We are talking about adding entries to a list in most cases... In scikit-image we use the following script to check for the most basic discrepancies:

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

2014-06-14 Thread Stéfan van der Walt
Hi Nadav On Sat, Jun 14, 2014 at 8:11 AM, Nadav Horesh nad...@visionsense.com wrote: In [4]: np.__version__ Out[4]: '1.9.0b1' The documentation specify that the mode parameter is optional I don't see the optional specification in the docstring. Perhaps because mode=None in the signature?

Re: [Numpy-discussion] SciPy 2014 BoF NumPy Participation

2014-06-05 Thread Stéfan van der Walt
Hi Kyle Kyle Mandli writes: The BoF format would be up to those who would lead the discussion, a couple of ideas used in the past include picking out a few of the lead devs to be on a panel and have a QA type of session or an open QA with perhaps audience guided list of topics.

Re: [Numpy-discussion] Suggestions for GSoC Projects

2014-02-07 Thread Stéfan van der Walt
On 8 Feb 2014 04:51, Ralf Gommers ralf.gomm...@gmail.com wrote: Members of the dipy team would also be interested. That's specifically for the spherical harmonics topic right? Right. Spherical harmonics are used as bases in many of DiPy's reconstruction algorithms. You are right, though,

Re: [Numpy-discussion] Suggestions for GSoC Projects

2014-02-06 Thread Stéfan van der Walt
On Tue, 04 Feb 2014 12:21:58 +0100, Ralf Gommers wrote: Finding a suitable mentor for whatever project Jennifer chooses is an important factor in the choice of project, so I have to ask: do you have the bandwidth to be a mentor or help out this summer? I completely agree. I have time to be

Re: [Numpy-discussion] Suggestions for GSoC Projects

2014-01-31 Thread Stéfan van der Walt
On Fri, 31 Jan 2014 04:31:01 +0530, jennifer stone wrote: 3. As stated earlier, we have spherical harmonic functions (with much scope for dev) we are yet to have elliptical and cylindrical harmonic function, which may be developed. As stated before, I am personally interested in seeing the

Re: [Numpy-discussion] Numpy Enhancement Proposal: group_by functionality

2014-01-26 Thread Stéfan van der Walt
Hi Eelco On Sun, 26 Jan 2014 12:20:04 +0100, Eelco Hoogendoorn wrote: key1 = list('abaabb') key2 = np.random.randint(0,2,(6,2)) values = np.random.rand(6,3) print group_by((key1, key2)).median(values) I agree that group_by functionality could be handy in numpy. In the above example, what

Re: [Numpy-discussion] MKL and OpenBLAS

2014-01-26 Thread Stéfan van der Walt
On Sun, 26 Jan 2014 16:40:44 +0200, Pauli Virtanen wrote: The Numpy Windows binaries distributed in the numpy project at sourceforge.net are compiled with ATLAS, which should count as an optimized BLAS. I don't recall what's the situation with OSX binaries, but I'd believe they're with Atlas

Re: [Numpy-discussion] Comparison changes

2014-01-25 Thread Stéfan van der Walt
On Sat, 25 Jan 2014 01:05:15 +0100, Sebastian Berg wrote: 1. Comparison with None will broadcast in the future, so that `arr == None` will actually compare all elements to None. (A FutureWarning for now) This is a very useful change in behavior--thanks! Stéfan

Re: [Numpy-discussion] np.array creation: unexpected behaviour

2014-01-24 Thread Stéfan van der Walt
On Fri, 24 Jan 2014 17:30:33 +0100, Emanuele Olivetti wrote: I just came across this unexpected behaviour when creating a np.array() from two other np.arrays of different shape. The tuple parsing for the construction of new numpy arrays is pretty tricky/hairy, and doesn't always do exactly what

Re: [Numpy-discussion] (no subject)

2014-01-21 Thread Stéfan van der Walt
On Tue, 21 Jan 2014 21:56:17 +0530, jennifer stone wrote: I am an undergraduate student with CS as major and have interest in Math and Physics. This has led me to use NumPy and SciPy to work on innumerable cases involving special polynomial functions and polynomials like Legendre polynomials,

Re: [Numpy-discussion] surprising behavior of np.asarray on masked arrays

2013-12-05 Thread Stéfan van der Walt
Hi Faraz On Thu, 05 Dec 2013 19:14:01 -0800, Faraz Mirzaei wrote: If I pass a masked array through np.asarray, I get original unmasked array. `asarray` disregards any information attached to the underlying ndarray by the subclass. To preserve the subclass, you'd need to use `asanyarray`. The

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-19 Thread Stéfan van der Walt
On Tue, Nov 19, 2013 at 6:03 PM, Henry Gomersall h...@cantab.net wrote: However, FFTW is dual licensed GPL/commercial and so the wrappers are also GPL by necessity. I'm not sure if that is true, strictly speaking--you may license your wrapper code under any license you wish. It's just that it

Re: [Numpy-discussion] ANN: NumPy 1.7.2rc1 release

2013-11-10 Thread Stéfan van der Walt
Hi Christian On Sun, 10 Nov 2013 21:06:00 -0300, Christian K. wrote: On OSX compilation succeeds (with some errors though) but test() fails. Do you have the build log available as well? Thanks Stéfan ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Numpy 1.9 release date

2013-11-10 Thread Stéfan van der Walt
On 9 Nov 2013 03:22, Charles R Harris charlesr.har...@gmail.com wrote: that the main thing missing at this point is fixing the datetime problems. What needs to be done, and what is the plan forward? Is there perhaps an issue one can follow? Thanks Stéfan

[Numpy-discussion] ANN: scikit-image 0.9 release

2013-10-21 Thread Stéfan van der Walt
Sharma - Johannes Schönberger - Chintak Sheth - Kirill Shklovsky - Steven Silvester - Matt Terry - Riaan van den Dool - Stéfan van der Walt - Josh Warner - Adam Wisniewski - Yang Zetian - Tony S Yu ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Python function for line intersection??

2013-10-11 Thread Stéfan van der Walt
On Tue, Oct 8, 2013 at 3:15 PM, Happyman bahtiyor_zohi...@mail.ru wrote: # slope of each line m = (B[:, 1] - A[:, 1]) / (B[:, 0] - A[:, 0]) b = A[:, 1] - m * A[:, 0] Calculating the slope of a line leads to difficulties, e.g. when dealing with vertical lines. Rather, parameterize

Re: [Numpy-discussion] [SciPy-Dev] 1.8.0rc1

2013-10-02 Thread Stéfan van der Walt
Hi Chuck On Tue, Oct 1, 2013 at 1:07 AM, Charles R Harris charlesr.har...@gmail.com wrote: I'll bet the skimage problems come from https://github.com/numpy/numpy/pull/3811. They may be doing something naughty... Reverting that commit fixes those skimage failures. However, there are a

Re: [Numpy-discussion] Behavior of nan{max, min} and nanarg{max, min} for all-nan slices.

2013-10-02 Thread Stéfan van der Walt
On 2 Oct 2013 18:04, Charles R Harris charlesr.har...@gmail.com wrote: The question is what to do when all-nan slices are encountered in the nan{max,min} and nanarg{max, min} functions. Currently in 1.8.0, the first returns nan and raises a warning, the second returns intp.min and raises a

Re: [Numpy-discussion] Behavior of nan{max, min} and nanarg{max, min} for all-nan slices.

2013-10-02 Thread Stéfan van der Walt
On 2 Oct 2013 19:14, Benjamin Root ben.r...@ou.edu wrote: And it is logically consistent, I think. a[nanargmax(a)] == nanmax(a) (ignoring the silly detail that you can't do an equality on nans). Why do you call this a silly detail? It seems to me a fundamental flaw to this approach. Stéfan

Re: [Numpy-discussion] Behavior of nan{max, min} and nanarg{max, min} for all-nan slices.

2013-10-02 Thread Stéfan van der Walt
On 2 Oct 2013 21:19, Charles R Harris charlesr.har...@gmail.com wrote: The main problem I had was deciding what arg{max, min} should return as the return value is an integer. I like your suggestion of returning 0. This doesn't allow the user to know the difference between valid and invalid

Re: [Numpy-discussion] Numpy newbie question: matrix creation

2013-09-25 Thread Stéfan van der Walt
On Wed, Sep 25, 2013 at 9:06 AM, Edmondo Porcu edmondo.po...@gmail.com wrote: I am a Newbie with Numpy and I would need some advice on how to create a matrix with certain characteristics : - Every entry should be minimum 0 maximum 1 with a step of 0.1 (legal values are 0,0.1,0.2,0.3 etc)

Re: [Numpy-discussion] Generating a (uniformly distributed) random bit list of length N

2013-09-22 Thread Stéfan van der Walt
On 22 Sep 2013 23:04, David Goldsmith d.l.goldsm...@gmail.com wrote: Is np.random.randint(2, size=N) the fastest way to do this? Thanks! Are you concerned about speed or memory use? The operation you show should already be quite fast. A more memory efficient approach would be to generate

Re: [Numpy-discussion] multiprocessing, numpy and 32-64 bit cohabitation

2013-09-19 Thread Stéfan van der Walt
On Wed, Sep 18, 2013 at 2:51 AM, Antony Lee antony@berkeley.edu wrote: While I realize that this is certainly tweaking multiprocessing beyond its specifications, I would like to use it on Windows to start a 32-bit Python process from a 64-bit Python process (use case: I need to interface

Re: [Numpy-discussion] find appropriate dtype based on a set of values

2013-09-03 Thread Stéfan van der Walt
On Tue, Sep 3, 2013 at 2:47 PM, Robert Kern robert.k...@gmail.com wrote: Here's one way of doing it: https://gist.github.com/stefanv/6413742 You can probably reduce the amount of work by only comparing a.min() and a.max() instead of the whole array. Thanks, fixed. Stéfan

Re: [Numpy-discussion] Faster np.triu_indices

2013-09-02 Thread Stéfan van der Walt
On Mon, Sep 2, 2013 at 12:38 AM, Daniel Smith malor...@me.com wrote: This is just a first run at the function, and unfortunately does not work for k0. However, it does return the correct results for k=0 and is between 2-8 faster on my machine then `np.triu_indices`. Any thoughts on this?

Re: [Numpy-discussion] find appropriate dtype based on a set of values

2013-09-02 Thread Stéfan van der Walt
On Mon, Sep 2, 2013 at 4:21 PM, Gregorio Bastardo gregorio.basta...@gmail.com wrote: np.min_scalar_type([-1,256]) # int16 expected dtype('int32') Am I missing something? Anyone knows how to achieve the desired operation? The docstring states explicitly that this use case is not supported.

Re: [Numpy-discussion] Relative speed

2013-08-30 Thread Stéfan van der Walt
On Fri, Aug 30, 2013 at 6:20 AM, Anubhab Baksi anubha...@gmail.com wrote: I need to deal with nearly 2**19 or 2**20 arrays of length about 250 each. As mentioned elsewhere in this thread: what does deal mean. You may be better off with something like: http://kwant-project.org/tinyarray/

Re: [Numpy-discussion] _PyADt

2013-08-30 Thread Stéfan van der Walt
On Fri, Aug 30, 2013 at 1:27 AM, Charles R Harris charlesr.har...@gmail.com wrote: Anyone know what _PyADt is? It turns up in ndarraytypes.h #define PyDataType_ISBOOL(obj) PyTypeNum_ISBOOL(_PyADt(obj)) That code looks broken--can't we just remove it? Stéfan

Re: [Numpy-discussion] Structured array dtype

2013-08-30 Thread Stéfan van der Walt
Hi Nicolas On Fri, 30 Aug 2013 17:26:51 +0200, Nicolas Rougier wrote: Z = np.zeros(10, [('a', np.float32, 3), ('b', np.float32, 4)]) Z['a'].dtype dtype('float32') Z.dtype['a'] dtype(('f4', (3,))) Does that mean that dtype['a'] is the dtype of field 'a' when in Z, while

Re: [Numpy-discussion] Adding an axis argument to numpy.unique

2013-08-20 Thread Stéfan van der Walt
On Tue, Aug 20, 2013 at 2:39 AM, Joe Kington joferking...@gmail.com wrote: That's certainly a potential source of confusion. However, I can't seem to come up with a better name for the kwarg. Matlab's unique function has a rows option, which is probably a more intuitive name, but doesn't imply

Re: [Numpy-discussion] Deprecation of financial routines

2013-08-20 Thread Stéfan van der Walt
On Mon, Aug 19, 2013 at 3:47 PM, Skipper Seabold jsseab...@gmail.com wrote: +1 on scipy.finance / scipy.financial (or even numpy.finance / numpy.financial) Are there no external libraries that deal with these things? If they exist, we can deprecate with two releases pointing to that external

Re: [Numpy-discussion] Upcoming 1.8 release.

2013-08-15 Thread Stéfan van der Walt
On Thu, Aug 15, 2013 at 3:42 PM, Charles R Harris charlesr.har...@gmail.com wrote: I'm thinking of making the 1.8.x branch next Sunday. Any complaints, thoughts? Thanks, Chuck. Are there any specific PRs up for review that should be incorporated into 1.8? Stéfan

Re: [Numpy-discussion] Using as_strided to avoid copy on repeat (with 2-dimensional array)

2013-08-13 Thread Stéfan van der Walt
On Mon, Aug 12, 2013 at 11:23 PM, Robert Kern robert.k...@gmail.com wrote: Is it possible to do the same using 'as_strided' to avoid copy (and still get the same output shape for B) ? No, this would not be uniformly strided in the 0 axis. Now, if only we supported simple fraction strides...

Re: [Numpy-discussion] Reading footer lines

2013-08-13 Thread Stéfan van der Walt
Hi Resmi On Tue, Aug 13, 2013 at 2:20 PM, Resmi l.re...@gmail.com wrote: I've a list of long files of numerical data ending with footer lines (beginning with #). I am using numpy.loadtxt to read the numbers, and loadtxt ignores these footer lines. I want the numpy code to read one of the

Re: [Numpy-discussion] quickselect via np.partition available in 1.8.dev

2013-08-12 Thread Stéfan van der Walt
Hi Julian On Mon, Aug 12, 2013 at 4:23 PM, Julian Taylor jtaylor.deb...@googlemail.com wrote: The function exposing it is: numpy.partition(data, kth=int/array, axis=-1, kind=introselect, order=None) This looks great, thanks very much! A minor bug was introduced into the Bento build:

Re: [Numpy-discussion] unit tests / developing numpy

2013-07-25 Thread Stéfan van der Walt
On Thu, 25 Jul 2013 08:47:03 +, Graeme B. Bell wrote: Does anyone know how to get the unit tests to run on a local fork, without doing a complete install of numpy? I usually do an in-place build with either bentomaker build -i -j or python setup.py build_ext -i Then export

Re: [Numpy-discussion] add .H attribute?

2013-07-24 Thread Stéfan van der Walt
On Wed, Jul 24, 2013 at 2:15 AM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: On Tue, Jul 23, 2013 at 6:09 AM, Pauli Virtanen p...@iki.fi wrote: The .H property has been implemented in Numpy matrices and Scipy's sparse matrices for many years. Then we're done. Numpy is an

Re: [Numpy-discussion] add .H attribute?

2013-07-24 Thread Stéfan van der Walt
On Wed, Jul 24, 2013 at 9:15 AM, Sebastian Haase seb.ha...@gmail.com wrote: I feel that adding a method .H() would be the compromise ! Thinking about this more, I think it would just confuse most users... why .T and not .H; then you have to start explaining the underlying implementation

Re: [Numpy-discussion] Question regarding documentation of structured arrays

2013-07-24 Thread Stéfan van der Walt
Hi Hanno On Wed, Jul 24, 2013 at 11:46 AM, Hanno Klemm kl...@phys.ethz.ch wrote: I found the following inconsistency between the advertised and the actual behviour of structured arrays: on http://docs.scipy.org/doc/numpy/user/basics.rec.html it says in the section Accessing multiple fields

Re: [Numpy-discussion] Question regarding documentation of structured arrays

2013-07-24 Thread Stéfan van der Walt
Hallo Hanno On Wed, Jul 24, 2013 at 1:29 PM, Hanno Klemm kl...@phys.ethz.ch wrote: I would be happy to file a pull request against the docs if you (or somebody) could point me to a document on how and where to do that. The file you want to edit is here:

Re: [Numpy-discussion] add .H attribute?

2013-07-24 Thread Stéfan van der Walt
On Wed, Jul 24, 2013 at 12:54 PM, Nathaniel Smith n...@pobox.com wrote: The point isn't that there's code that relies specifically on .T returning a view. It's that to be a good programmer, you need to *know whether* it returns a view -- exactly as you say in the second paragraph. And a

Re: [Numpy-discussion] Splitting numpydoc to a separate repo

2013-07-24 Thread Stéfan van der Walt
On Wed, Jul 24, 2013 at 5:33 PM, Pauli Virtanen p...@iki.fi wrote: How about splitting doc/sphinxext out from the main Numpy repository to a separate `numpydoc` repo under Numpy project? That would be great, also for scikits that rely on these extensions. Stéfan

Re: [Numpy-discussion] add .H attribute?

2013-07-23 Thread Stéfan van der Walt
On Tue, Jul 23, 2013 at 10:35 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: So -1 on using A.H for anything but a proper view, and A.conjt() or something similar for a method that does a copy. A.T.conj() is just as clear, so my feeling is that we should either add A.H / A.H() or

Re: [Numpy-discussion] .flat (was: add .H attribute?)

2013-07-23 Thread Stéfan van der Walt
On Tue, Jul 23, 2013 at 3:39 PM, Alan G Isaac alan.is...@gmail.com wrote: On 7/23/2013 9:09 AM, Pauli Virtanen wrote: .flat which I think is rarely used Until ``diagonal`` completes its transition, use of ``flat`` seems the best way to reset the diagonal on an array. Am I wrong? I use it

Re: [Numpy-discussion] add .H attribute?

2013-07-23 Thread Stéfan van der Walt
On Tue, Jul 23, 2013 at 4:51 PM, Nathaniel Smith n...@pobox.com wrote: Don't know if we want to actually do this, but it's doable. Would we need a matching conjugate data-type for each complex data-type then, or can the data-type be parameterized? Stéfan

Re: [Numpy-discussion] Bringing order to higher dimensional operations

2013-07-22 Thread Stéfan van der Walt
On Sat, Jul 20, 2013 at 7:44 AM, josef.p...@gmail.com wrote: related: is there any advantage to np.add.reduce? I find it more difficult to read than sum() and still see it used sometimes. I think ``np.add.reduce`` just falls out of the ufunc implementation--there's no per ufunc choice to

Re: [Numpy-discussion] User Guide

2013-07-19 Thread Stéfan van der Walt
On Fri, Jul 19, 2013 at 12:21 AM, Rob Clewley rob.clew...@gmail.com wrote: The exception: one can have arrays of python objects, including numpy objects, which allows arrays to contain different sized elements. What are numpy objects? numpy objects - numpy ndarrays or numpy ndarray objects?

Re: [Numpy-discussion] Bringing order to higher dimensional operations

2013-07-19 Thread Stéfan van der Walt
On Thu, Jul 18, 2013 at 2:52 PM, Nathaniel Smith n...@pobox.com wrote: Compare: gu_dot_leftwards(ones((10, 11, 4)), ones((11, 12, 3, 4))) - (10, 12, 3, 4) versus gu_dot_rightwards(ones((4, 10, 11)), ones((3, 4, 11, 12))) - (3, 4, 10, 12) The second makes quite a bit more sense to me, and

Re: [Numpy-discussion] Bringing order to higher dimensional operations

2013-07-19 Thread Stéfan van der Walt
On Fri, Jul 19, 2013 at 5:31 PM, Nathaniel Smith n...@pobox.com wrote: 3) Extend the gufunc machinery to understand the idea that some core dimensions are allowed to take on a special nonexistent size. So the signature for dot would be: (m*,k) x (k, n*) - (m*, n*) where '*' denotes

Re: [Numpy-discussion] add .H attribute?

2013-07-18 Thread Stéfan van der Walt
On Sat, Jul 13, 2013 at 7:46 PM, Nathaniel Smith n...@pobox.com wrote: Why not just write def H(a): return a.conj().T It's hard to convince students that this is the Best Way of doing things in NumPy. Why, they ask, can you do it using a' in MATLAB, then? I've tripped over this one

Re: [Numpy-discussion] azip

2013-07-18 Thread Stéfan van der Walt
On Thu, Jul 18, 2013 at 7:06 PM, Alan G Isaac alan.is...@gmail.com wrote: On 7/18/2013 1:03 PM, Robert Kern wrote: np.column_stack([x, b]) does everything you need. So it does. It's not referenced from the hstack or concatenate documentation. A pull request would fix all of that in seconds!

Re: [Numpy-discussion] azip

2013-07-18 Thread Stéfan van der Walt
Hi Ben On Thu, Jul 18, 2013 at 7:18 PM, Benjamin Root ben.r...@ou.edu wrote: Forgive my ignorance, but has numpy and scipy stopped doing that weird doc editing thing that existed back in the days of Trac? I have actually held back on submitting doc edits because I hated using that thing so

Re: [Numpy-discussion] PIL and NumPy

2013-07-15 Thread Stéfan van der Walt
Dear Brady On Fri, 12 Jul 2013 22:00:08 -0500, Brady McCary wrote: I want to load images with PIL and then operate on them with NumPy. According to the PIL and NumPy documentation, I would expect the following to work, but it is not. Reading images as PIL is a little bit trickier than one

Re: [Numpy-discussion] What should be the result in some statistics corner cases?

2013-07-15 Thread Stéfan van der Walt
On Mon, 15 Jul 2013 08:33:47 -0600, Charles R Harris wrote: On Mon, Jul 15, 2013 at 8:25 AM, Benjamin Root ben.r...@ou.edu wrote: This is going to need to be heavily documented with doctests. Also, just to clarify, are we talking about a ValueError for doing a nansum on an empty array as

Re: [Numpy-discussion] What should be the result in some statistics corner cases?

2013-07-15 Thread Stéfan van der Walt
On Mon, 15 Jul 2013 18:46:33 -0600, Charles R Harris wrote: So nansum should return zeros rather than the current NaNs? Yes, my feeling is that nansum([]) should be 0. Stéfan ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] read-only or immutable masked array

2013-07-12 Thread Stéfan van der Walt
On Fri, Jul 12, 2013 at 4:41 PM, Gregorio Bastardo gregorio.basta...@gmail.com wrote: array.flags.writeable = False is perfectly fine, but it does not work on ma-s. Moreover, mask hardening only protects masked elements, and does not raise error (as I'd expect). You probably have to modify

Re: [Numpy-discussion] np.ma.argmax not respecting the mask?

2013-07-09 Thread Stéfan van der Walt
On Tue, Jul 9, 2013 at 2:55 PM, Chao YUE chaoyue...@gmail.com wrote: I am using 1.7.1 version of numpy and np.ma.argmax is not repecting the mask? In [96]: d3 Out[96]: masked_array(data = [[-- -- -- -- 4] [5 -- 7 8 9]], mask = [[ True True True True False] [False

Re: [Numpy-discussion] FWIW: regressions of dependees of nukmpy 1.7.0b1

2012-09-06 Thread Stéfan van der Walt
On Wed, Sep 5, 2012 at 1:38 PM, Yaroslav Halchenko li...@onerussian.com wrote: skimage_0.6.1-1.dscok FAILED This breakage is due to https://github.com/numpy/numpy/issues/392 Thanks for checking! Stéfan ___

Re: [Numpy-discussion] Buildbot status

2012-07-09 Thread Stéfan van der Walt
On Sun, Jul 8, 2012 at 3:44 PM, Chris Ball s0454...@sms.ed.ac.uk wrote: I'm happy to help connect slaves to the EC2 buildbot if someone sends connection details to me. Thanks very much, Chris. Matthew gave us access to the NiPy build slaves, so catch me online then we can hook those up.

Re: [Numpy-discussion] Buildbot status

2012-07-07 Thread Stéfan van der Walt
On Thu, Jul 5, 2012 at 4:36 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: So feel free to go ahead with what you think is the best and I will join you in a few days. I propose that we following a simple migration path for now: move the current buildbot onto the EC2 instance, redirect

Re: [Numpy-discussion] Buildbot status

2012-07-03 Thread Stéfan van der Walt
On Mon, Jul 2, 2012 at 6:31 PM, Travis Oliphant tra...@continuum.io wrote: Ondrej should have time to work on this full time in the coming days. That's great; having Ondrej on this full time will help a great deal. NumFocus can provide some funding needed for maintaining servers, etc, but

[Numpy-discussion] Buildbot status

2012-07-02 Thread Stéfan van der Walt
Hi all, I'd like to find out what the current status of continuous integration is for numpy. I'm aware of: a) http://buildbot.scipy.org -- used by Ralf for testing releases? b) http://travis-ci.org -- connected via GitHub c) http://184.73.247.160:8111 -- dedicated Amazon EC2 with TeamCity d)

Re: [Numpy-discussion] Buildbot status

2012-07-02 Thread Stéfan van der Walt
On Mon, Jul 2, 2012 at 5:31 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Yes, definitely. I will have time to work on the tests in about 2 weeks. Could you coordinate with Travis? He can make it official. I'd gladly coordinate with everyone, but I'd like to do it here on the mailing list so

[Numpy-discussion] SciPy2012 conference: Last week for early birds, poster submissions

2012-06-12 Thread Stéfan van der Walt
Hi everyone We're rapidly approaching SciPy2012 http://conference.scipy.org/scipy2012, which takes place in Austin, Texas from July 16th to 21st. This is a reminder that the *discounted early bird registration* closes on the 18th of this month. Also, we decided to keep the queue for *poster

Re: [Numpy-discussion] [enhancement] sum_angle() and sum_polar()

2012-05-29 Thread Stéfan van der Walt
On Mon, May 28, 2012 at 11:53 AM, Travis Oliphant tra...@continuum.io wrote: I could see these functions going into scipy.ndimage but again because they are not necessarily just image processing functions, and the fact that they are so simple, perhaps they are best put into NumPy itself. I'm

Re: [Numpy-discussion] tracing numpy data allocation with python callbacks

2012-05-17 Thread Stéfan van der Walt
On Wed, May 16, 2012 at 12:34 PM, Thouis Jones thouis.jo...@curie.fr wrote: I wondered, however, if there were a better way to accomplish the same goal, preferably in pure python. Fabien recently posted this; not sure if it addresses your use case:

Re: [Numpy-discussion] Fancy-indexing reorders output in corner cases?

2012-05-14 Thread Stéfan van der Walt
Hi Zach On Mon, May 14, 2012 at 4:33 PM, Zachary Pincus zachary.pin...@yale.edu wrote: The below seems to be a bug, but perhaps it's unavoidably part of the indexing mechanism? It's easiest to show via example... note that using [0,1] to pull two columns out of the array gives the same

Re: [Numpy-discussion] copying array to itself

2012-05-03 Thread Stéfan van der Walt
On Thu, May 3, 2012 at 1:51 AM, Henry Gomersall h...@cantab.net wrote: Right, so this is expected behaviour then. Is this documented somewhere? It strikes me that this is pretty unexpected behaviour. Imagine the way you would code this in a for-loop. You want a = np.arange(10) a[2:] = a[:-2]

Re: [Numpy-discussion] record arrays and vectorizing

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 11:06 AM, Moroney, Catherine M (388D) catherine.m.moro...@jpl.nasa.gov wrote: I will want to compare a 7-element vector (called element) to a large list of similarly-dimensioned vectors (called target, and pick out the vector in target that is the closest to element

Re: [Numpy-discussion] copying array to itself

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 9:03 AM, Henry Gomersall h...@cantab.net wrote: Is this some nuance of the way numpy does things? Or am I missing some stupid bug in my code? Try playing with the parameters of the following code: sz = 1 N = 10 import numpy as np x = np.arange(sz) y = x.copy()

Re: [Numpy-discussion] sparse array data

2012-05-02 Thread Stéfan van der Walt
Hi Francesc On Wed, May 2, 2012 at 1:53 PM, Francesc Alted franc...@continuum.io wrote: and add another one for the actual values of the array.  For a 3-D sparse array, this looks like: dim0 | dim1 | dim2 | value ==    0 |   0  |   0  | val0    0 |  10  | 100  |

Re: [Numpy-discussion] record arrays initialization

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 2:45 PM, Moroney, Catherine M (388D) catherine.m.moro...@jpl.nasa.gov wrote: Find the best match in an array t(5000, 7) for a single vector e(7).  Now scale it up so e is (128, 512, 7) and I want to return a (128, 512) array of the t-identifiers that are the best

Re: [Numpy-discussion] sparse array data

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 3:20 PM, Francesc Alted franc...@continuum.io wrote: On 5/2/12 4:07 PM, Stéfan van der Walt wrote: Well, as the OP said, coo_matrix does not support dimensions larger than 2, right? That's just an implementation detail, I would imagine--I'm trying to figure out

Re: [Numpy-discussion] record arrays initialization

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 4:26 PM, Moroney, Catherine M (388D) catherine.m.moro...@jpl.nasa.gov wrote: Using structured arrays is making my code complex when I try to call the vectorized function.  If I stick to the original record arrays, what's the best way of initializing b from a without doing

Re: [Numpy-discussion] record arrays initialization

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 4:46 PM, Kevin Jacobs jac...@bioinformed.com bioinfor...@gmail.com wrote: A FLANN implementation should be even faster--perhaps by as much as another factor of two. I guess it depends on whether you care about the Approximate in Fast Library for Approximate Nearest

Re: [Numpy-discussion] sparse array data

2012-05-02 Thread Stéfan van der Walt
On Wed, May 2, 2012 at 6:25 PM, Travis Oliphant tra...@continuum.io wrote: The only new principle (which is not strictly new --- but new to NumPy's world-view) is using one (or more) fields of a structured array as synthetic dimensions which replace 1 or more of the raw table dimensions. Ah,

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread Stéfan van der Walt
On Tue, Apr 24, 2012 at 11:12 AM, Charles R Harris charlesr.har...@gmail.com wrote: The advantage of nans, I suppose, is that they are in the hardware and so Why are we having a discussion on NAN's in a thread on consensus? This is a strong indicator of the problem we're facing. Stéfan

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread Stéfan van der Walt
On Tue, Apr 24, 2012 at 2:25 PM, Charles R Harris charlesr.har...@gmail.com wrote: Why are we having a discussion on NAN's in a thread on consensus? This is a strong indicator of the problem we're facing. We seem to have a consensus regarding interest in the topic. For the benefit of those of

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread Stéfan van der Walt
On Tue, Apr 24, 2012 at 4:49 PM, Charles R Harris charlesr.har...@gmail.com wrote: But a right to veto doesn't automatically extend to everyone who happens to have an interest in a topic. The time has long gone when we simply hacked on NumPy for our own benefit; if you will, NumPy users are

Re: [Numpy-discussion] What is consensus anyway

2012-04-23 Thread Stéfan van der Walt
On Mon, Apr 23, 2012 at 4:39 PM, Charles R Harris charlesr.har...@gmail.com wrote: I'm starting to think that a fork might be the best solution to the present problem. If you are referring to the traditional concept of a fork, and not to the type we frequently make on GitHub, then I'm surprised

Re: [Numpy-discussion] draft enum NEP

2012-03-15 Thread Stéfan van der Walt
On Thu, Mar 15, 2012 at 4:02 PM, Nathaniel Smith n...@pobox.com wrote: I'm not sure what it would even mean to treat this kind of data as flags, since you can't take the bitwise-or of two strings... This makes a more sense outside of ndarrays, where you would do something like: enum FLAG0 = 1,

Re: [Numpy-discussion] np.longlong casts to int

2012-02-22 Thread Stéfan van der Walt
On Wed, Feb 22, 2012 at 2:47 PM, Matthew Brett matthew.br...@gmail.com wrote: In [4]: np.array([2.1], dtype=np.longlong) Out[4]: array([2], dtype=int64) Maybe just a typo: In [3]: np.array([2.1], dtype=np.longfloat) Out[3]: array([ 2.1], dtype=float128) Stéfan

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Stéfan van der Walt
On Mon, Feb 20, 2012 at 1:54 AM, Pauli Virtanen p...@iki.fi wrote: 20.02.2012 08:35, Paul Anton Letnes kirjoitti: In the language wars, I have one question. Why is Fortran not being considered? Fortran is OK for simple numerical algorithms, but starts to suck heavily if you need to do any

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Stéfan van der Walt
Hey, Mark On Feb 18, 2012 11:18 PM, Mark Wiebe mwwi...@gmail.com wrote: My experience has been that providing a C API from a C++ library is no harder than providing a C API from a C library. Interfacing to compiled C++ libs have been tricky, so can this concern be dismissed so easily? (Some

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-19 Thread Stéfan van der Walt
On Feb 19, 2012 12:09 AM, Mark Wiebe mwwi...@gmail.com wrote: These standard library issues were definitely valid 10 years ago, but all the major C++ compilers have great C++98 support now. Is there a specific target platform/compiler combination you're thinking of where we can do tests on this?

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Stéfan van der Walt
On Feb 19, 2012 2:41 AM, Mark Wiebe mwwi...@gmail.com wrote: This is the role I see good coding standards and consistent code review playing. Programmers who don't know how to write good C++ code can be taught. There are also good books to read, like C++ Coding Standards, Effective C++, and

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-19 Thread Stéfan van der Walt
On Feb 19, 2012 4:14 PM, Sturla Molden stu...@molden.no wrote: Den 20.02.2012 00:39, skrev Nathaniel Smith: But there's an order-of-magnitude difference in compile times between most real-world C projects and most real-world C++ projects. It might not be a deal-breaker and it might not

Re: [Numpy-discussion] Buildbot/continuous integration (was Re: Issue Tracking)

2012-02-17 Thread Stéfan van der Walt
On Thu, Feb 16, 2012 at 3:52 PM, Chris Ball ceb...@gmail.com wrote: After getting to this initial stage, I'll discuss about adding more features (such as testing pull requests, performance testing, building binaries on the different operating systems, etc). Also, if it's working well, this

Re: [Numpy-discussion] test errors on deprecation/runtime warnings

2012-02-17 Thread Stéfan van der Walt
Hi Ralf On Thu, Feb 16, 2012 at 11:05 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: Last week we merged https://github.com/numpy/numpy/pull/201, which causes DeprecationWarning's and RuntimeWarning's to be converted to errors if they occur when running the test suite. It looks like this

Re: [Numpy-discussion] Change in scalar upcasting rules for 1.6.x?

2012-02-14 Thread Stéfan van der Walt
On Tue, Feb 14, 2012 at 12:05 AM, Eric Firing efir...@hawaii.edu wrote: On 02/13/2012 08:07 PM, Charles R Harris wrote: Let it go, Travis. It's a waste of time. (Off-list) Chuck, I really appreciate your consistent good sense; this is just one of many examples.  Thank you for all your

Re: [Numpy-discussion] trapezoidal grids

2012-02-10 Thread Stéfan van der Walt
On Fri, Feb 10, 2012 at 9:26 AM, Hugo Gagnon sourceforge.nu...@user.fastmail.fm wrote: Hello, Say I have four corner points a = (X0, Y0), b = (X1, Y1), c = (X2, Y2) and d = (X3, Y3): a--b  \        /  \      /   cd Is there a function like meshgrid that would return me a

  1   2   3   4   5   6   7   8   >