Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Jacco Hoekstra - LR
How about using the old name np.mat() for this type of array creation? So the: A = np.mat(“1 2;3 4”) creates a two dimensional array. But then resulting in an array A instead of the matrix type? It might at least provide some partial downward compatibility. Best regards, Jacco Hoekstra

[Numpy-discussion] 1.10-devel is open

2014-07-06 Thread Charles R Harris
Just so. The fixes for 1.9.0b1 are now in that branch ready for the next beta. Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Alexander Belopolsky
On Sun, Jul 6, 2014 at 10:59 PM, Eric Firing wrote: > > I would suggest calling it something like np.array_simple or > > np.array_from_string, but the best choice IMO, would be > > np.ndarray.from_string (a static constructor method). > > > I think the problem is that this defeats the point: mini

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Eric Firing
On 2014/07/06, 4:27 PM, Alexander Belopolsky wrote: > > On Sun, Jul 6, 2014 at 6:06 PM, Eric Firing > wrote: > > (I'm not entirely convinced > np.arr() is a good idea at all; but if it is, it must be kept simple.) > > > If you are going to introduce this functi

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Alexander Belopolsky
On Sun, Jul 6, 2014 at 6:06 PM, Eric Firing wrote: > (I'm not entirely convinced > np.arr() is a good idea at all; but if it is, it must be kept simple.) > If you are going to introduce this functionality, please don't call it np.arr. Right now, np.a presents you with a whopping 53 completion

Re: [Numpy-discussion] parsing dtype descriptors

2014-07-06 Thread Ted Sandler
Thanks! On Fri, Jul 4, 2014 at 1:53 AM, Robert Kern wrote: > On Thu, Jul 3, 2014 at 10:53 PM, Ted Sandler > wrote: > > Thanks. No, it's not what I'm looking for. > > > > I'm looking for the code that parses the string " array > > header's descriptor: > > > > {'descr': ' > > > There are many

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Eric Firing
On 2014/07/06, 11:43 AM, Nathaniel Smith wrote: > On Sun, Jul 6, 2014 at 9:35 PM, Daniel da Silva > wrote: >> The idea is that there be a short-hand for creating arrays as there is for >> matrices: >> >>np.mat('.2 .7 .1; .3 .5 .2; .1 .1 .9') >> >> It was suggested in GitHub issue #4817 in ligh

Re: [Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Benjamin Root
I guess I always treated scalars as something special when it comes to broadcasting. Seeing these examples, I can see how my grokking of broadcasting was incomplete. I still think that the assignment of an array of values (as opposed to a scalar) to nothing could potentially mask deeper issues, bu

Re: [Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Nathaniel Smith
On Sun, Jul 6, 2014 at 9:14 PM, Benjamin Root wrote: > as for the broadcasting issue, I can see it for the second case, but the > first case still doesn't sit right with me. My understanding of broadcasting > is to effectively *expand* an array to match the shape of another array (or > some target

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Nathaniel Smith
On Sun, Jul 6, 2014 at 9:35 PM, Daniel da Silva wrote: > The idea is that there be a short-hand for creating arrays as there is for > matrices: > > np.mat('.2 .7 .1; .3 .5 .2; .1 .1 .9') > > It was suggested in GitHub issue #4817 in light that it would be beneficial > to beginners and to present

Re: [Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Sebastian Berg
On So, 2014-07-06 at 16:14 -0400, Benjamin Root wrote: > re: deprecation warnings... that's what I get when I am working on my > non-dev box because I am at the conference, and have gotten too used > to the setup of my dev box... > > > as for the broadcasting issue, I can see it for the second ca

[Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Daniel da Silva
The idea is that there be a short-hand for creating arrays as there is for matrices: np.mat('.2 .7 .1; .3 .5 .2; .1 .1 .9') It was suggested in GitHub issue #4817 in light that it would be beneficial to beginners and to presenters during demonstratio

Re: [Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Benjamin Root
re: deprecation warnings... that's what I get when I am working on my non-dev box because I am at the conference, and have gotten too used to the setup of my dev box... as for the broadcasting issue, I can see it for the second case, but the first case still doesn't sit right with me. My understan

Re: [Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Charles R Harris
On Sun, Jul 6, 2014 at 1:32 PM, Benjamin Root wrote: > While trying to wrap my head around the issues with matplotlib's tri > module and the new numpy indexing, I have made some test cases where I > wonder if warnings should be issued. > > import numpy as np > a = np.ones((10,)) > all_false = np.

Re: [Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Sebastian Berg
On So, 2014-07-06 at 15:32 -0400, Benjamin Root wrote: > While trying to wrap my head around the issues with matplotlib's tri > module and the new numpy indexing, I have made some test cases where I > wonder if warnings should be issued. > > > import numpy as np > > a = np.ones((10,)) > > all_f

Re: [Numpy-discussion] Cython requirement?

2014-07-06 Thread Benjamin Root
Ok, must have missed that discussion. I don't like the reasoning, but that boat has sailed. On Sun, Jul 6, 2014 at 3:00 PM, Robert Kern wrote: > On Sun, Jul 6, 2014 at 7:40 PM, Benjamin Root wrote: > > When did Cython become a build requirement? I remember discussing the > use of > > Cython a

[Numpy-discussion] indexed assignment testcases

2014-07-06 Thread Benjamin Root
While trying to wrap my head around the issues with matplotlib's tri module and the new numpy indexing, I have made some test cases where I wonder if warnings should be issued. import numpy as np a = np.ones((10,)) all_false = np.zeros((10,), dtype=bool) a[all_false] = np.array([2.0]) # the shap

Re: [Numpy-discussion] Cython requirement?

2014-07-06 Thread Robert Kern
On Sun, Jul 6, 2014 at 7:40 PM, Benjamin Root wrote: > When did Cython become a build requirement? I remember discussing the use of > Cython a while back, and IIRC the agreement was that both the cython code > and the generated C files would be included in version control so that > cython wouldn't

Re: [Numpy-discussion] Cython requirement?

2014-07-06 Thread Daπid
On 6 July 2014 20:40, Benjamin Root wrote: > When did Cython become a build requirement? I remember discussing the use > of Cython a while back, and IIRC the agreement was that both the cython > code and the generated C files would be included in version control so that > cython wouldn't be a bui

Re: [Numpy-discussion] Questions about fixes for 1.9.0rc2

2014-07-06 Thread Sebastian Berg
On So, 2014-07-06 at 12:07 -0600, Charles R Harris wrote: > > > > On Sun, Jul 6, 2014 at 11:54 AM, Benjamin Root > wrote: > I see that a solution has already been found and merged. Are > there any remaining issues for matplotlib to resolve? > > > > >

[Numpy-discussion] Cython requirement?

2014-07-06 Thread Benjamin Root
When did Cython become a build requirement? I remember discussing the use of Cython a while back, and IIRC the agreement was that both the cython code and the generated C files would be included in version control so that cython wouldn't be a build requirement, only a developer requirement when mod

Re: [Numpy-discussion] Questions about fixes for 1.9.0rc2

2014-07-06 Thread Charles R Harris
On Sun, Jul 6, 2014 at 11:54 AM, Benjamin Root wrote: > I see that a solution has already been found and merged. Are there any > remaining issues for matplotlib to resolve? > > You might take a look at the fixes in the matplotlib PR. They struck me as a bit hasty rather than fixes for the underly

Re: [Numpy-discussion] Questions about fixes for 1.9.0rc2

2014-07-06 Thread Benjamin Root
I see that a solution has already been found and merged. Are there any remaining issues for matplotlib to resolve? On Sun, Jul 6, 2014 at 2:30 AM, Sebastian Berg wrote: > On Sa, 2014-07-05 at 22:13 -0400, Benjamin Root wrote: > > Drats... I actually know those two topics... and I might have fre

Re: [Numpy-discussion] Remove bento from numpy

2014-07-06 Thread David Cournapeau
On Sun, Jul 6, 2014 at 2:24 AM, Julian Taylor wrote: > On 05.07.2014 19:11, David Cournapeau wrote: > > On Sun, Jul 6, 2014 at 1:55 AM, Julian Taylor > > mailto:jtaylor.deb...@googlemail.com>> > > wrote: > > > > On 05.07.2014 18:40, David Cournapeau wrote: > > > The efforts are on average

Re: [Numpy-discussion] [Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

2014-07-06 Thread Sturla Molden
Sebastian Berg wrote: >> Could it be useful for structured arrays? > > Not sure how. The named columns seem like a decent point to me. NumPy is naming the fields, not the axes, so it might be more useful for Pandas than NumPy. For example if we have an image with r,g,b data, NumPy would not n

Re: [Numpy-discussion] About the npz format

2014-07-06 Thread Sturla Molden
There is no os.mkfifo on Windows. Sturla Valentin Haenel wrote: > sorry, for the top-post, but should we add this as an issue on the > github tracker? I'd like to revisit it this summer. > > V- > > * Julian Taylor [2014-04-18]: >> On 18.04.2014 18:29, Valentin Haenel wrote: >>> Hi, >>> >>> *