Re: [Numpy-discussion] numpy.scipy.org page 404s

2013-05-04 Thread Robert Kern
On Sat, May 4, 2013 at 12:43 AM, Pauli Virtanen wrote: > 26.04.2013 18:51, Robert Kern kirjoitti: > [clip] >> Right now, the recurring cost is kicking the www.scipy.org wiki every >> once in a while under the deluge of spam. > > It's dying a slow death again. >

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-02 Thread Robert Kern
On Thu, May 2, 2013 at 3:57 PM, Charles R Harris wrote: > > On Thu, May 2, 2013 at 8:40 AM, Robert Kern wrote: >> >> On Thu, May 2, 2013 at 3:28 PM, Charles R Harris >> wrote: >> > >> > >> > On Thu, May 2, 2013 at 7:47 AM, Robert Kern >

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-02 Thread Robert Kern
On Thu, May 2, 2013 at 3:28 PM, Charles R Harris wrote: > > > On Thu, May 2, 2013 at 7:47 AM, Robert Kern wrote: >> >> On Thu, May 2, 2013 at 2:38 PM, Charles R Harris >> wrote: >> > >> > On Thu, May 2, 2013 at 7:28 AM, Robert Kern >> &

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-02 Thread Robert Kern
On Thu, May 2, 2013 at 2:38 PM, Charles R Harris wrote: > > On Thu, May 2, 2013 at 7:28 AM, Robert Kern wrote: >> >> On Thu, May 2, 2013 at 12:03 PM, Nathaniel Smith wrote: >> > On 1 May 2013 23:12, "Charles R Harris" >> > wrote: >> >>

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-02 Thread Robert Kern
;t checked, but I assume that what multiple output argument ufuncs do > is to return a tuple. You can't use a single array in the general case, > because the multiple output types might not be homogenous. Correct. [~] |19> np.modf.nout 2 [~] |20> np.modf(np.linspace(0, 1, 5)) (array([

Re: [Numpy-discussion] could anyone check on a 32bit system?

2013-05-01 Thread Robert Kern
Different optimization flags and compiler versions will probably also affect this, not just the target architecture. It's possible that those are actually the source of this observation. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-01 Thread Robert Kern
component will reduce a temporary. > The same goes for constructing a complex, real + imag * 1j Similarly, we can eliminate two temporaries here. Both of the cases are probably best addressed by a single function. The syntactic sugar of an np.i object is unnecessary, IMO. imag = np.tocomplex

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-01 Thread Robert Kern
ilable in the Cephes library. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.scipy.org page 404s

2013-04-26 Thread Robert Kern
to stop that is to help finish the migration of content to the new static site: https://github.com/scipy/scipy.org-new I think the major TODO items there are the conversion of the Topical Software and Cookbook pages. I can give dumps of the current wiki pages to anyone who wants to help with that. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.scipy.org page 404s

2013-04-26 Thread Robert Kern
orrectly, you'll need to point the numpy.scipy.org > CNAME to a non-github IP, and install a HTTP redirect **or** a HTTPD > rewrite on that IP. So we need to find a server to do that. Probably > easiest to ask numfocus, right? There's no need. We'll j

Re: [Numpy-discussion] numpy.scipy.org page 404s

2013-04-26 Thread Robert Kern
not clear exactly what it is referring to. Having an HTTP server with an A record for numpy.scipy.org that just issues HTTP 301 redirects for everything? I can look into getting that set up. https://help.github.com/articles/my-custom-domain-isn-t-working#multiple-domains-in-cname-file -- Robert Ke

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-26 Thread Robert Kern
s no problem with including the example that I wrote in the rollaxis() docstring. In any case, whether you put the documentation in the rollaxis() docstring or in one of the indexing/iteration sections, or (preferably) both, I strongly encourage you to do that first and see how it goes before addi

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-26 Thread Robert Kern
(3, 4, 6) (3, 4, 6) (3, 4, 6) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-25 Thread Robert Kern
lly left out of any tutorials or guides. Then let's add it. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-25 Thread Robert Kern
On Thu, Apr 25, 2013 at 6:54 PM, Matthew Brett wrote: > Hi, > > On Thu, Apr 25, 2013 at 10:42 AM, Robert Kern wrote: >> On Thu, Apr 25, 2013 at 6:30 PM, Matthew Brett >> wrote: >>> So the decision has to be based on some estimate of: >>> >>> 1)

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-25 Thread Robert Kern
On Thu, Apr 25, 2013 at 6:30 PM, Matthew Brett wrote: > Hi, > > On Thu, Apr 25, 2013 at 10:14 AM, Robert Kern wrote: >> On Wed, Apr 24, 2013 at 10:37 PM, andrew giessel >> wrote: >>> Hello all- >>> >>> A while back I emailed the list about functio

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-25 Thread Robert Kern
makes this more visible for > users, new and old, and I hope members of this list will agree it is worth > adding to the namespace. I'm afraid I don't. It's a just a reduced-functionality version of rollaxis(). I don't think the additional name adds anything substantial.

Re: [Numpy-discussion] numpy scalars and savez -- bug?

2013-04-19 Thread Robert Kern
ays -- we developed savez for a reason... > but maybe I just need to give it a shot and see how it works. The rationale behind .npy format are laid out here: https://github.com/numpy/numpy/blob/master/doc/neps/npy-format.txt -- Robert Kern ___ NumPy

Re: [Numpy-discussion] numpy scalars and savez -- bug?

2013-04-19 Thread Robert Kern
s array[()]gives a rank-3 view of the last 3 axes (i.e. all of them) The rank-N-general rules look like so: For a rank-N array, an N-tuple gives a scalar. Subsequent (N-M)-tuples gives appropriate rank-M views picked out by the tuple. I can't explain the scalar[()] behavior, though. :-)

Re: [Numpy-discussion] numpy scalars and savez -- bug?

2013-04-19 Thread Robert Kern
ed by those limitations, you should start using more full-fledged and standard file formats. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy scalars and savez -- bug?

2013-04-18 Thread Robert Kern
""" > > I also see: > > For a description of the ``.npy`` format, see `format`. > > but no idea where to find 'format' -- it looks like it should be a > link in the Sphinx docs, but it's not. It does seem to be missing from the docs. https://github.com/numpy/numpy/blob/master/numpy/lib/format.py -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy scalars and savez -- bug?

2013-04-18 Thread Robert Kern
mpy.ndarray) > > > This has been annoying, particular as rank-zero scalars are kind of a pain. np.save() and company (and the NPY format itself) are for arrays, not for scalars. np.save() uses an np.asanyarray() to coerce its input which is why your scalar gets converted to a rank-zero arra

Re: [Numpy-discussion] Random number generation and testing across different OS's.

2013-04-12 Thread Robert Kern
flow on the 32-bit platform but won't on a 32-bit platform, but those are usually indicative of bugs to be fixed. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Please stop bottom posting!!

2013-04-11 Thread Robert Kern
ask general "numpy ecosystem" questions here as a starting point, one must expect to be pointed to better resources when they exist and to follow up there. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Canopy and Anaconda

2013-04-11 Thread Robert Kern
e products, especially questions about their development roadmaps. Whether or not it is "reasonable" or on-topic to ask here, one won't get good answers here. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-04-10 Thread Robert Kern
On Wed, Apr 10, 2013 at 1:06 PM, Nathaniel Smith wrote: > This kind of personal attack is never appropriate for this list. Please > stop. My apologies. I will stop. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.or

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-04-10 Thread Robert Kern
On Wed, Apr 10, 2013 at 12:30 PM, Dmitrey wrote: > > > --- Исходное сообщение --- > От кого: "Robert Kern" > Дата: 9 апреля 2013, 14:29:43 >> Well, it's your software. You are free to make it as buggy as you wish, I >> guess. > > Yes, and that

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-04-09 Thread Robert Kern
On Tue, Apr 9, 2013 at 4:15 PM, Dmitrey wrote: > > > --- Исходное сообщение --- > От кого: "Robert Kern" > Дата: 16 марта 2013, 22:15:07 > > On Sat, Mar 16, 2013 at 6:19 PM, Dmitrey wrote: >> >> >> --- Исходное сообщение --- >> От кого: &

Re: [Numpy-discussion] numpy array to C API

2013-03-20 Thread Robert Kern
just `PyArray` to my knowledge. Do you mean direct access to the `data` member of the PyArrayObject struct? Yes, that is deprecated. Use the PyArray_DATA() macro to get a `void*` pointer to the start of the data. http://docs.scipy.org/doc/numpy/reference/c-

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-03-16 Thread Robert Kern
On Sat, Mar 16, 2013 at 6:19 PM, Dmitrey wrote: > > > --- Исходное сообщение --- > От кого: "Robert Kern" > Дата: 16 марта 2013, 19:54:51 > > On Sat, Mar 16, 2013 at 10:39 AM, Matthieu Brucher > wrote: >> Even if they have different hashes, they can

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-03-16 Thread Robert Kern
to be used in the code snippet that Dmitrey showed. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Robert Kern
On Thu, Mar 14, 2013 at 11:00 AM, Neal Becker wrote: > Robert Kern wrote: > >> On Wed, Mar 13, 2013 at 12:16 AM, Neal Becker wrote: >>> I guess I talked to you about 100 years ago about sharing state between >>> numpy >>> rng and code I have in c++ that wr

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Robert Kern
struct and export a pointer to it via a PyCapsule. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] can't run cython on mtrand.pyx

2013-03-14 Thread Robert Kern
On Wed, Mar 13, 2013 at 7:20 PM, Neal Becker wrote: > Robert Kern wrote: > >> On Wed, Mar 13, 2013 at 6:40 PM, Neal Becker wrote: >>> Grabbed numpy-1.7.0 source. >>> Cython is 0.18 >>> >>> cython mtrand.pyx produces lots of errors. >> >&g

Re: [Numpy-discussion] can't run cython on mtrand.pyx

2013-03-13 Thread Robert Kern
On Wed, Mar 13, 2013 at 6:40 PM, Neal Becker wrote: > Grabbed numpy-1.7.0 source. > Cython is 0.18 > > cython mtrand.pyx produces lots of errors. It helps to copy-and-paste the errors that you are seeing. In any case, Cython 0.18 works okay on master's mtrand.pyx sources.

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Robert Kern
On Tue, Mar 12, 2013 at 10:38 PM, Neal Becker wrote: > Nathaniel Smith wrote: > >> On Tue, Mar 12, 2013 at 9:25 PM, Nathaniel Smith wrote: >>> On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern wrote: >>>> On Sun, Mar 10, 2013 at 6:12 PM, Siu Kwan Lam wrote: >&g

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-11 Thread Robert Kern
e is some low-level C work that needs to be done to allow the non-uniform distributions to be shared between implementations of the core uniform PRNG, but that's the same no matter how you organize the upper layer. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpy deprecation schedule

2013-03-06 Thread Robert Kern
On Wed, Mar 6, 2013 at 10:56 PM, Nathaniel Smith wrote: > On Wed, Mar 6, 2013 at 10:53 PM, Robert Kern wrote: >> On Wed, Mar 6, 2013 at 10:45 PM, Nathaniel Smith wrote: >>> On Wed, Mar 6, 2013 at 10:33 PM, Robert Kern wrote: >>>> On Wed, Mar 6, 2013 at 8:09 PM, N

Re: [Numpy-discussion] Numpy deprecation schedule

2013-03-06 Thread Robert Kern
On Wed, Mar 6, 2013 at 10:45 PM, Nathaniel Smith wrote: > On Wed, Mar 6, 2013 at 10:33 PM, Robert Kern wrote: >> On Wed, Mar 6, 2013 at 8:09 PM, Nathaniel Smith wrote: >>> A number of items on the 1.8 todo list are reminders to remove things >>> that we deprecate

Re: [Numpy-discussion] Numpy deprecation schedule

2013-03-06 Thread Robert Kern
n to heart, though. We shouldn't remove stuff faster than 12 months or so. I just think that it should modify our release process, not our "marking for deprecation" process. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Remove interactive setup

2013-03-05 Thread Robert Kern
1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: no commands supplied Anyone who was expecting the interactive setup will probably complain here. -- Robert Kern ___

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-26 Thread Robert Kern
On Tue, Feb 26, 2013 at 12:11 AM, Charles R Harris wrote: > > On Sat, Feb 23, 2013 at 1:33 PM, Robert Kern wrote: >> >> On Sat, Feb 23, 2013 at 7:25 PM, Nathaniel Smith wrote: >> > On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki >> > wrote: >> >&

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Robert Kern
why > np.abs(a) is so much harder than a.abs(), and why this function and > not other unary functions? Or even abs(a). -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Seeking help and support for next-gen math modeling tools using Python

2013-02-20 Thread Robert Kern
m/numpy/numpy > http://sourceforge.net/projects/numpy/files/ > > Is there some misleading documentation still around that gave > you a different impression? Todd is responding to a message about PyDSTool, which is developed on Sourceforge, not numpy. -- Robert Kern

Re: [Numpy-discussion] savetxt trouble

2013-02-20 Thread Robert Kern
6e-01+7.071067811865431318e-01j) > ... What were you expecting? A single row? savetxt() always writes out len(arr) rows. Reshape your vector into a (1,N) array if you want a single row. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Purpose of this list

2013-02-15 Thread Robert Kern
numpy-discussion is for both development discussions and support questions. The set of people interested in the developer discussions is mostly the same as the set of people giving support, so there has never been too much impetus for breaking the list into two

Re: [Numpy-discussion] How to upload to pypi

2013-02-12 Thread Robert Kern
ne? (I didn't find them, only a similar package > https://github.com/schmir/pypiserver, but that doesn't seem to be it.) http://wiki.python.org/moin/CheeseShopDev You can get help with PyPI on Catalog-SIG: http://mail.python.org/mailman/listinfo/catalog-sig -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] savez documentation flaw

2013-02-05 Thread Robert Kern
o the docstrings via sphinx, like in scipy? Click on the "Edit Page" link on the left. Follow the instructions on the front page of the numpy Docstring Editor site to sign up: http://docs.scipy.org/numpy/Front%20Page/ -- Robert Kern ___

Re: [Numpy-discussion] Any plans for windows 64-bit installer for 1.7?

2013-02-04 Thread Robert Kern
not public, I guess. I suppose anyone > who uses the image would have to have their own licenses for the Intel > stuff? Does anyone have experience of this? You need to purchase one license per developer: http://software.intel.com/en-us/articles/intel-math-kernel-libra

Re: [Numpy-discussion] pull request: generalized ufunc signature fix and lineal algebra generalized ufuncs

2013-01-31 Thread Robert Kern
the community and we want >> to share the work done. > > It certainly does look useful. My question is -- why do we need two > complete copies of the linear algebra routine interfaces? Can we just > replace the existing linalg functions with these new implementations? > Or if not, wh

Re: [Numpy-discussion] Matrix Expontial for differenr t.

2013-01-28 Thread Robert Kern
ion and avoid the inv() by using solve(). viy0 = np.linalg.solve(v, y0) for i, t in enumerate(tlist): # And no need to dot() the first part. Broadcasting works just fine. sol_t = (v * np.exp(-w*t)).dot(viy0) ... -- Robert Kern ___ NumPy-Discussi

Re: [Numpy-discussion] another little index puzzle

2013-01-21 Thread Robert Kern
e > equal, so I can remove them. So for example, the 1st and last row. all_equal_mask = np.logical_and.reduce(arr[:,1:] == arr[:,:-1], axis=1) some_unequal = arr[~all_equal_mask] -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] argsort

2013-01-16 Thread Robert Kern
idx0 array([[0], [1], [2], [3], [4]]) [~] |7> v[idx0, idx] array([[ 3, 4], [ 1, 12], [ 7, 23], [ 6, 11], [ 8, 9]]) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] argsort

2013-01-15 Thread Robert Kern
,1]] http://docs.scipy.org/doc/numpy/user/basics.indexing.html#indexing-multi-dimensional-arrays -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-14 Thread Robert Kern
fferent, so the result of the multiplication will be different, so fill can not be used. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-13 Thread Robert Kern
On Mon, Jan 14, 2013 at 1:04 AM, Nathaniel Smith wrote: > On Sun, Jan 13, 2013 at 11:48 PM, Skipper Seabold wrote: >> On Sun, Jan 13, 2013 at 6:39 PM, Nathaniel Smith wrote: >>> >>> On Sun, Jan 13, 2013 at 11:24 PM, Robert Kern >>> wrote: >>> >

Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-13 Thread Robert Kern
alternative that does not expand the API with two-liners is to let the ndarray.fill() method return self: a = np.empty(...).fill(20.0) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] np.seterr doesn't work for masked array?

2012-12-14 Thread Robert Kern
a good to overwrite > the error setting. Precisely. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] np.seterr doesn't work for masked array?

2012-12-14 Thread Robert Kern
ly desirable since many of the masked values will be trip these errors spuriously even though they will be masked out in the result. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] install numpy 1.6.2 .dmg on macosx 10.7, check for python 2.7

2012-11-29 Thread Robert Kern
on framework again. Just don't mv it from where it gets installed. Then the numpy-1.6.2-py2.7-python.org-macosx10.3.dmg will recognize it. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.power vs pylab.power

2012-11-15 Thread Robert Kern
it make sense if pylab.power were the frequently used power > function rather than a means for sampling from the power distribution? Matplotlib may be discussed over here: https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Robert Kern

Re: [Numpy-discussion] Is there a way to reset an accumulate function?

2012-10-24 Thread Robert Kern
cumulate(reset_idx) cumsum = np.cumsum(x) cumsum = cumsum - cumsum[reset_idx] return cumsum -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] matrix norm

2012-10-22 Thread Robert Kern
it, but it >> did just bite me and a student a few times. > > The trail leads to here: > http://projects.scipy.org/numpy/attachment/ticket/36/numpy-6-norm-change- > default.diff > > Seems like the chances of learning the reason why this change was done > are pretty sli

Re: [Numpy-discussion] distutils & C++ & Fortran

2012-10-16 Thread Robert Kern
ink flags for the language, often because they are more variable with respect to specific compiler versions. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.distutils, lapack, and cython

2012-09-28 Thread Robert Kern
ls, so you may want to do some digging of your own. > 2) Is there a better way to build Cython files than this weird > monkey-patching thing they propose? (It's still better than the horror > that setuptools/distribute require, but I guess I have higher > expectations...) Sadly,

Re: [Numpy-discussion] broadcasting question

2012-08-30 Thread Robert Kern
How do I do that? C, dummy = numpy.broadcast_arrays(A[:,newaxis,:], numpy.empty([1,state,1])) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread Robert Kern
On Wed, Aug 8, 2012 at 10:34 AM, David Cournapeau wrote: > On Wed, Aug 8, 2012 at 12:55 AM, Nathaniel Smith wrote: >> On Mon, Aug 6, 2012 at 8:31 PM, Robert Kern wrote: >>> Those are not the original Fortran sources. The original Fortran sources are >>> in the public

Re: [Numpy-discussion] Licensing question

2012-08-06 Thread Robert Kern
matics Institute > >> University of Warwick > >> Coventry > >> West Midlands > >> CV4 7AL > >> United Kingdom > >> ___ > >> NumPy-Discussion mailing list > >> NumPy-Discussion@scipy

Re: [Numpy-discussion] load of custom .npy file fails with numpy 2.0.0

2012-08-02 Thread Robert Kern
On Thu, Aug 2, 2012 at 11:41 PM, Geoffrey Irving wrote: > On Thu, Aug 2, 2012 at 1:26 PM, Robert Kern wrote: >> On Thu, Aug 2, 2012 at 8:46 PM, Geoffrey Irving wrote: >>> Hello, >>> >>> The attached .npy file was written from custom C++ code. It loads >

Re: [Numpy-discussion] load of custom .npy file fails with numpy 2.0.0

2012-08-02 Thread Robert Kern
format standard was that it would accept what numpy spits out for the descr, not that it would accept absolutely anything that numpy.dtype() can consume, even deprecated aliases (though I will admit that that is almost what the NEP says). In particular, endianness really should be included or else y

Re: [Numpy-discussion] bug in numpy.where?

2012-07-30 Thread Robert Kern
;> Values from which to choose. `x` and `y` need to have the same >> shape as `condition` >> >> In the example you gave, x was a scalar. > > net.max() returns an array: > > >>> print type(net.max()) >

Re: [Numpy-discussion] Synonym standards

2012-07-26 Thread Robert Kern
> > I would prefer not to use: from xxx import *, > > because of the name pollution. > > The name convention that I copied above facilitates avoiding the pollution. > > In the same spirit, I've used: > import pylab as plb But in that same spirit, using np and plt separately is preferred. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] building a numpy egg for centos

2012-07-24 Thread Robert Kern
m? "python setup.py bdist_egg" should never work, but "python setupegg.py bdist_egg" should. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] use slicing as argument values?

2012-07-13 Thread Robert Kern
7;1:3,:,4') for a[1:3,:,4] ect. > I am very close now. [~] |1> from numpy import index_exp [~] |2> index_exp[1:3,:,2:4] (slice(1, 3, None), slice(None, None, None), slice(2, 4, None)) -- Robert Kern ___ NumPy-Discussion mailing list NumP

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Robert Kern
8, 9, 10]) > > In [26]: b[slice(1)] > Out[26]: array([1]) > > In [27]: b[slice(4)] > Out[27]: array([1, 2, 3, 4]) > > In [28]: b[slice(None,4)] > Out[28]: array([1, 2, 3, 4]) > > so slice(4) is actually slice(None,4), how can I exactly want retrieve a[4] &

Re: [Numpy-discussion] Type specific sorts: objects, structured arrays, and all that.

2012-07-10 Thread Robert Kern
4? You need special handling for NaTs to be consistent with how we deal with NaNs in floats. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] "import numpy" performance

2012-07-02 Thread Robert Kern
s would impact projects like ipython that does > tab-completion support, but I know that that would drive me nuts in my basic > tab-completion setup I have for my regular python terminal.  Of course, in > the grand scheme of things, that really isn't all that imp

Re: [Numpy-discussion] Bug in pickling an ndarray?

2012-06-30 Thread Robert Kern
ok before you leap. > I had explicit check for > myarray.base==None, which it is not when I get the ndarray from a pickle. That is not the way to check if an ndarray owns its data. Instead, check a.flags['OWNDATA'] -- Robert Kern ___ Nu

Re: [Numpy-discussion] Good way to develop numpy as popular choice!

2012-06-21 Thread Robert Kern
On Thu, Jun 21, 2012 at 7:33 PM, eat wrote: > Heh, > > On Thu, Jun 21, 2012 at 6:03 PM, Robert Kern wrote: >> >> On Thu, Jun 21, 2012 at 3:59 PM, bob tnur wrote: >> > Hi all numpy fun;) >> > This question is already posted in stackoverflow by some people,

Re: [Numpy-discussion] Good way to develop numpy as popular choice!

2012-06-21 Thread Robert Kern
on is herein: > http://stackoverflow.com/questions/10074270/how-can-i-find-the-minimum-number-of-lines-needed-to-cover-all-the-zeros-in-a-2 My "numpy solution" for this is just $ pip install munkres http://pypi.python.org/pypi/munkres -- Robert Kern

Re: [Numpy-discussion] trivial question?

2012-06-20 Thread Robert Kern
On Wed, Jun 20, 2012 at 3:58 PM, Neal Becker wrote: > Maybe I'm being slow, but is there any convenient function to calculate, > for 2 vectors: > > \sum_i \sum_j x_i y_j > > (I had a matrix once, but it vanished without a trace) np.multiply.outer(x, y)

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-07 Thread Robert Kern
onsistency it would be desirable for this to return > > [8, 9, 0, 1] Unfortunately, this would be inconsistent with Python semantics: [~] |1> u = range(10) [~] |2> u[-2:2] [] -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Di

Re: [Numpy-discussion] Are "min", "max" documented for scalars?

2012-06-07 Thread Robert Kern
useful behavior > needs to be documented. Suggestions for improving the standard Python documentation (which documents these functions) can be sent here: http://docs.python.org/bugs.html#documentation-bugs -- Robert Kern ___ NumPy-Discussion mailing lis

Re: [Numpy-discussion] Incrementing with advanced indexing: why don't repeated indexes repeatedly increment?

2012-06-06 Thread Robert Kern
nyway, my point was that a having a function with the "adding" semantics in > NumPy would be handy. x += numpy.bincount(idx, vals, minlength=len(x)) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scip

Re: [Numpy-discussion] varargs for logical_or, etc

2012-06-05 Thread Robert Kern
                apply_binary (np.logical_or, u/5 == 3, u/5 == 8, u/5 == > 13)) reduce(np.logical_and, args) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] How to remove any row or column of a numpy matrix whose sum is 3?

2012-06-04 Thread Robert Kern
= np.delete(M, bad_rows, axis=0) P = np.delete(P, bad_cols, axis=1) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpy code in GPL package

2012-05-30 Thread Robert Kern
ITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- Robert Kern ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-25 Thread Robert Kern
On Fri, May 25, 2012 at 3:55 PM, Nathaniel Smith wrote: > On May 25, 2012 2:21 PM, "Robert Kern" wrote: >> >> On Thu, May 24, 2012 at 5:52 PM, Robert Kern wrote: >> >> > (Hmm, now that I think about it, the edge cases are when the strides >> &g

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-25 Thread Robert Kern
On Fri, May 25, 2012 at 3:55 PM, Nathaniel Smith wrote: > On May 25, 2012 2:21 PM, "Robert Kern" wrote: >> >> On Thu, May 24, 2012 at 5:52 PM, Robert Kern wrote: >> >> > (Hmm, now that I think about it, the edge cases are when the strides >> &g

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-25 Thread Robert Kern
On Thu, May 24, 2012 at 5:52 PM, Robert Kern wrote: > (Hmm, now that I think about it, the edge cases are when the strides > are 0 or negative. 0-stride axes can simply be removed, and I think we > should be able to work back to a first item and flip the sign on the > negative

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-24 Thread Robert Kern
r negative. 0-stride axes can simply be removed, and I think we should be able to work back to a first item and flip the sign on the negative strides. The typical positive-stride solution can be found in an open source C++ global array code, IIRC. Double-hmmm...) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] how to avoid re-shaping

2012-05-22 Thread Robert Kern
er data.flat, if you must iterate manually. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] question about in-place operations

2012-05-22 Thread Robert Kern
sufficient for > me. BLAS has the xAXPY functions, which will do this for float and complex. import numpy as np from scipy.linalg import fblas def add_scaled_inplace(a, scale, b): if np.issubdtype(a.dtype, complex): fblas.zaxpy(b, a, a=scale) else: fblas.daxpy(b, a, a

Re: [Numpy-discussion] un-silencing Numpy's deprecation warnings

2012-05-22 Thread Robert Kern
On Tue, May 22, 2012 at 2:45 PM, Nathaniel Smith wrote: > On Tue, May 22, 2012 at 11:06 AM, Robert Kern wrote: >> On Tue, May 22, 2012 at 9:27 AM, Nathaniel Smith wrote: >>> So starting in Python 2.7 and 3.2, the Python developers have made >>> DeprecationWa

Re: [Numpy-discussion] un-silencing Numpy's deprecation warnings

2012-05-22 Thread Robert Kern
On Tue, May 22, 2012 at 11:14 AM, Dag Sverre Seljebotn wrote: > On 05/22/2012 12:06 PM, Robert Kern wrote: >> On Tue, May 22, 2012 at 9:27 AM, Nathaniel Smith  wrote: >>> So maybe we should change all our DeprecationWarnings into >>> FutureWarnings (or at least the on

Re: [Numpy-discussion] un-silencing Numpy's deprecation warnings

2012-05-22 Thread Robert Kern
r DeprecationWarnings possibly should be FutureWarnings, but most shouldn't I don't think. I can see a case being made for using a custom non-silenced exception for some cases that really probably show up mostly in true end-user scenarios, e.g. genfromtxt(). But

Re: [Numpy-discussion] pre-PEP for making creative forking of NumPy less destructive

2012-05-18 Thread Robert Kern
even sure if such a thing exists, in which case NumPy would > indeed be a special case. numpy *is* pretty unique in this regard. The need for this style of polymorphism at this level is even rarer. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Robert Kern
On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith wrote: > On Wed, May 16, 2012 at 4:24 PM, Robert Kern wrote: >> On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith wrote: >> >>> I built some pristine python 2.7 installs from scratch (no virtualenv, >>> no distr

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Robert Kern
ms fine - it finds atlas in /usr/lib64/atlas. > > With current numpy master (3d416a0a), numpy itself builds fine, > but scipy's setup.py can't find atlas (even though it's looking in the > right places). Log attached. The log says it's looking in /usr/lib64/atl

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Robert Kern
xecutable that runs the setup.py manages to import. So if you are using virtualenv, just make sure that the virtualenv is activated and "python" refers to the virtualenv's python executable. -- Robert Kern ___ NumPy-Discussion mailing lis

<    1   2   3   4   5   6   7   8   9   10   >