[Numpy-discussion] adding unsigned int and int

2011-12-06 Thread Skipper Seabold
Hi, Is this intended? [~/] [1]: np.result_type(np.uint, np.int) [1]: dtype('float64') [~/] [2]: np.version.version [2]: '2.0.0.dev-aded70c' Skipper ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] adding unsigned int and int

2011-12-06 Thread Skipper Seabold
On Tue, Dec 6, 2011 at 7:53 AM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Tue, Dec 6, 2011 at 4:45 AM, Skipper Seabold jsseab...@gmail.com wrote: Hi, Is this intended? [~/] [1]: np.result_type(np.uint, np.int) [1]: dtype('float64') I would guess so - if your system ints

Re: [Numpy-discussion] Forbidden charcter in the names argument of genfromtxt?

2012-02-20 Thread Skipper Seabold
On Mon, Feb 20, 2012 at 1:35 PM, Brett Olsen brett.ol...@gmail.com wrote: On Sat, Feb 18, 2012 at 8:12 PM, Adam Hughes hugad...@gwmail.gwu.edu wrote: Hey everyone, I have timeseries data in which the column label is simply a filename from which the original data was taken.  Here's some sample

Re: [Numpy-discussion] bincount([], minlength=2) should work right?

2012-02-25 Thread Skipper Seabold
On Sat, Feb 25, 2012 at 5:13 PM, Alan G Isaac alan.is...@gmail.com wrote: On 2/25/2012 4:44 PM, James Bergstra wrote: bincount([]) makes no sense, I disagree: http://permalink.gmane.org/gmane.comp.python.numeric.general/42041 but if a minlength argument is provided, then the routine

[Numpy-discussion] speed of array creation from tuples

2012-02-27 Thread Skipper Seabold
I am surprised by this (though maybe I shouldn't be?) It's always faster to use list comprehension to unpack lists of tuples than np.array/asarray? [~/] [1]: X = [tuple(np.random.randint(10,size=2)) for _ in range(100)] [~/] [2]: timeit np.array([x1 for _,x1 in X]) 1 loops, best of 3: 26.4

[Numpy-discussion] checking for c compiler during build

2012-03-07 Thread Skipper Seabold
Is there a way to use numpy.distuils to programmatically check for a C compiler at build time in a platform independent way? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] checking for c compiler during build

2012-03-07 Thread Skipper Seabold
On Wed, Mar 7, 2012 at 12:35 PM, Skipper Seabold jsseab...@gmail.com wrote: Is there a way to use numpy.distuils to programmatically check for a C compiler at build time in a platform independent way? Wading through the numpy/distutils code some more. Would something as simple as this work all

Re: [Numpy-discussion] numpy videos

2012-03-12 Thread Skipper Seabold
On Mon, Mar 12, 2012 at 6:04 PM, Abhishek Pratap apra...@lbl.gov wrote: Hey Guys Few days with folks at my first pycon has made me wonder how much of cool things I was missing .. I am looking to do some quick catch up on numpy and wondering if there are any set of videos that I can refer

[Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Skipper Seabold
Hi, I have a pull request here [1] to add a cut function similar to R's [2]. It seems there are often requests for similar functionality. It's something I'm making use of for my own work and would like to use in statstmodels and in generating instances of pandas' Factor class, but is this

Re: [Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Skipper Seabold
On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold jsseab...@gmail.com wrote: Hi, I have a pull request here [1] to add a cut function similar to R's [2]. It seems there are often requests for similar functionality. It's

Re: [Numpy-discussion] adding a cut function to numpy

2012-04-16 Thread Skipper Seabold
On Mon, Apr 16, 2012 at 8:08 PM, Tony Yu tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 6:01 PM, Skipper Seabold jsseab...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:51 PM, Tony Yu tsy...@gmail.com wrote: On Mon, Apr 16, 2012 at 5:27 PM, Skipper Seabold jsseab...@gmail.com wrote

Re: [Numpy-discussion] linalg.lstsq

2012-04-25 Thread Skipper Seabold
On Wed, Apr 25, 2012 at 12:13 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello, is there weighted version of linalg.lstsq available? In my case, b is a (N,K) matrix, so i can't use manual scaling of x and b. What shape are the weights in this case? I'm not that familiar with problems with an

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 Skipper Seabold
On Wed, May 16, 2012 at 11:50 AM, Robert Kern robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith n...@pobox.com wrote: On Wed, May 16, 2012 at 4:24 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith n...@pobox.com wrote: I

Re: [Numpy-discussion] Fwd: Named dtype array: Difference between a[0]['name'] and a['name'][0]?

2012-05-21 Thread Skipper Seabold
On Mon, May 21, 2012 at 4:37 PM, Travis Oliphant tra...@continuum.io wrote: This is the right place to ask, it's just that it can take time to get an answer because people who might know the answer may not have the time to respond immediately. The short answer is that this is not really a

Re: [Numpy-discussion] NumPy 1.7 release delays

2012-06-26 Thread Skipper Seabold
On Tue, Jun 26, 2012 at 7:59 PM, Fernando Perez fperez@gmail.com wrote: On Tue, Jun 26, 2012 at 1:10 PM, Travis Oliphant tra...@continuum.io wrote: One issues is the one that Sage identified about the array interface regression as noted by Jason.    Any other regressions from 1.5.x need to

Re: [Numpy-discussion] Multivariate hypergeometric distribution?

2012-07-02 Thread Skipper Seabold
On Mon, Jul 2, 2012 at 9:35 PM, josef.p...@gmail.com wrote: On Mon, Jul 2, 2012 at 8:08 PM, josef.p...@gmail.com wrote: On Mon, Jul 2, 2012 at 4:16 PM, Fernando Perez fperez@gmail.com wrote: Hi all, in recent work with a colleague, the need came up for a multivariate

Re: [Numpy-discussion] view of recarray issue

2012-07-25 Thread Skipper Seabold
On Sun, Jul 22, 2012 at 2:15 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: Hi, Just a heads up that right now views of recarrays seem to be problematic, this doesn't work anymore: import statsmodels.api as sm dta = sm.datasets.macrodata.load() # returns a record array with 14 fields

Re: [Numpy-discussion] ANN: NumPy 1.7.0b1 release

2012-08-21 Thread Skipper Seabold
On Tue, Aug 21, 2012 at 3:59 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 8/21/2012 9:24 AM, Ondřej Čertík wrote: Hi, I'm pleased to announce the availability of the first beta release of NumPy 1.7.0b1. Sources and binary installers can be found at

Re: [Numpy-discussion] the mean, var, std of empty arrays

2012-11-21 Thread Skipper Seabold
On Wed, Nov 21, 2012 at 9:22 PM, Olivier Delalleau sh...@keba.be wrote: Current behavior looks sensible to me. I personally would prefer no warning but I think it makes sense to have one as it can be helpful to detect issues faster. -=- Olivier It's configurable. [~/] [1]:

[Numpy-discussion] result shape from dot for 0d, 1d, 2d scalar

2012-11-26 Thread Skipper Seabold
I discovered this because scipy.optimize.fmin_powell appears to squeeze 1d argmin to 0d unlike the other optimizers, but that's a different story. I would expect the 0d array to behave like the 1d array not the 2d as it does below. Thoughts? Maybe too big of a pain to change this behavior if

Re: [Numpy-discussion] result shape from dot for 0d, 1d, 2d scalar

2012-11-28 Thread Skipper Seabold
On Wed, Nov 28, 2012 at 12:31 PM, Sebastian Berg sebast...@sipsolutions.net wrote: Maybe a strict matrix product would make sense too, but the dot function behavior cannot be changed in any case, so its pointless to argue about it. Just make sure your arrays are 2-d (or matrices) if you want

Re: [Numpy-discussion] Proposal to drop python 2.4 support in numpy 1.8

2012-12-13 Thread Skipper Seabold
On Thu, Dec 13, 2012 at 12:00 PM, David Cournapeau courn...@gmail.com wrote: snip I would even go as far as dropping 2.5 as well then (RHEL 6 uses python 2.6). +1 Skipper ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

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

2013-01-13 Thread Skipper Seabold
On Sun, Jan 13, 2013 at 6:39 PM, Nathaniel Smith n...@pobox.com wrote: On Sun, Jan 13, 2013 at 11:24 PM, Robert Kern robert.k...@gmail.com wrote: On Sun, Jan 13, 2013 at 6:27 PM, Nathaniel Smith n...@pobox.com wrote: Hi all, PR 2875 adds two new functions, that generalize zeros(),

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

2013-02-25 Thread Skipper Seabold
On Mon, Feb 25, 2013 at 10:43 AM, Till Stensitzki mail.t...@gmx.de wrote: First, sorry that i didnt search for an old thread, but because i disagree with conclusion i would at least address my reason: I don't like np.abs(arr).max() because I have to concentrate to much on the braces,

Re: [Numpy-discussion] Numpy correlate

2013-03-18 Thread Skipper Seabold
On Mon, Mar 18, 2013 at 1:00 PM, Pierre Haessig pierre.haes...@crans.orgwrote: Hi Sudheer, Le 14/03/2013 10:18, Sudheer Joseph a écrit : Dear Numpy/Scipy experts, Attached is a script which I made to test the numpy.correlate ( which is called

[Numpy-discussion] Unable to building numpy with openblas using bento or distutils

2013-03-23 Thread Skipper Seabold
Some help on this would be greatly appreciated. It's been recommended to use OpenBlas over ATLAS, so I've been trying to build numpy with openblas and have run into a few problems. 1) Build fails using bento master and waf 1.7.9, see below. 2) Distutils doesn't seem to be able to find lapack as

Re: [Numpy-discussion] Unable to building numpy with openblas using bento or distutils

2013-03-23 Thread Skipper Seabold
mobile device, please excuse my brevity. On 23.03.2013, at 19:19, Skipper Seabold jsseab...@gmail.com wrote: Some help on this would be greatly appreciated. It's been recommended to use OpenBlas over ATLAS, so I've been trying to build numpy with openblas and have run into a few problems. 1

Re: [Numpy-discussion] Unable to building numpy with openblas using bento or distutils

2013-03-23 Thread Skipper Seabold
On Sat, Mar 23, 2013 at 7:26 PM, Ake Sandgren ake.sandg...@hpc2n.umu.se wrote: On Sat, 2013-03-23 at 14:19 -0400, Skipper Seabold wrote: Some help on this would be greatly appreciated. It's been recommended to use OpenBlas over ATLAS, so I've been trying to build numpy with openblas and have

Re: [Numpy-discussion] Unable to building numpy with openblas using bento or distutils

2013-03-23 Thread Skipper Seabold
On Sat, Mar 23, 2013 at 8:44 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sat, Mar 23, 2013 at 7:26 PM, Ake Sandgren ake.sandg...@hpc2n.umu.se wrote: On Sat, 2013-03-23 at 14:19 -0400, Skipper Seabold wrote: Some help on this would be greatly appreciated. It's been recommended to use

Re: [Numpy-discussion] Unable to building numpy with openblas usingbento or distutils

2013-03-25 Thread Skipper Seabold
On Mon, Mar 25, 2013 at 2:40 PM, Dinesh B Vadhia dineshbvad...@hotmail.comwrote: ** Caveat: Not tested but it did look interesting: http://osdf.github.com/blog/numpyscipy-with-openblas-for-ubuntu-1204-second-try.html . Would be interested to know if it worked out as want to try out OpenBlas

Re: [Numpy-discussion] the mean, var, std of non-arrays

2013-07-18 Thread Skipper Seabold
On Thu, Jul 18, 2013 at 10:49 PM, Yaroslav Halchenko li...@onerussian.comwrote: Hi everyone, Some of my elderly code stopped working upon upgrades of numpy and upcoming pandas: https://github.com/pydata/pandas/issues/4290 so I have looked at the code of 2481 def mean(a, axis=None,

Re: [Numpy-discussion] Deprecation of financial routines

2013-08-19 Thread Skipper Seabold
On Mon, Aug 19, 2013 at 9:38 AM, Cera, Tim t...@cerazone.net wrote: On Mon, Aug 19, 2013 at 2:37 AM, Juan Luis Cano juanlu...@gmail.com wrote: As now master is open for 1.9, following the discussion opened here https://github.com/numpy/numpy/issues/2880 it was suggested that we

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

2013-10-03 Thread Skipper Seabold
On Thu, Oct 3, 2013 at 9:10 AM, Benjamin Root ben.r...@ou.edu wrote: On Thu, Oct 3, 2013 at 6:06 AM, Daniele Nicolodi dani...@grinta.net wrote: Hello, sorry, I don't know where exactly jump in in the thread, it is getting quite long and articulated... On 02/10/2013 21:19, Charles R Harris

Re: [Numpy-discussion] deprecate numpy.matrix

2014-02-10 Thread Skipper Seabold
On Mon, Feb 10, 2014 at 2:49 PM, Matthew Brett matthew.br...@gmail.comwrote: Hi, On Mon, Feb 10, 2014 at 11:44 AM, josef.p...@gmail.com wrote: On Mon, Feb 10, 2014 at 2:12 PM, eat e.antero.ta...@gmail.com wrote: On Mon, Feb 10, 2014 at 9:08 PM, alex argri...@ncsu.edu wrote:

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread Skipper Seabold
On Sat, Feb 15, 2014 at 5:08 PM, josef.p...@gmail.com wrote: On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg sebast...@sipsolutions.net wrote: On Sa, 2014-02-15 at 16:37 -0500, alex wrote: Hello list, Here's another idea resurrection from numpy github comments that I've been advised

Re: [Numpy-discussion] 1.8.1 release

2014-03-06 Thread Skipper Seabold
Hi, Should [1] be considered a release blocker for 1.8.1? Skipper [1] https://github.com/numpy/numpy/issues/4442 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Is there a pure numpy recipe for this?

2014-03-26 Thread Skipper Seabold
On Wed, Mar 26, 2014 at 3:48 PM, Slaunger slaun...@gmail.com wrote: I am working on solving a recent recreational mathematical problem on Project Euler http://projecteuler.net . I have a solution, which works fine for small N up to 10^5 but it takes too long to compute for the actual problem,

Re: [Numpy-discussion] Is there a pure numpy recipe for this?

2014-03-26 Thread Skipper Seabold
On Wed, Mar 26, 2014 at 4:28 PM, Slaunger slaun...@gmail.com wrote: jseabold wrote IIUC, [~/] [1]: np.logical_and([True, False, True], [False, False, True]) [1]: array([False, False, True], dtype=bool) You can avoid looping over k since they're all the same length [~/] [3]:

Re: [Numpy-discussion] polynomial fromroots

2010-10-10 Thread Skipper Seabold
On Sat, Oct 9, 2010 at 10:36 PM, josef.p...@gmail.com wrote: On Sat, Oct 9, 2010 at 10:01 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Oct 9, 2010 at 7:47 PM, josef.p...@gmail.com wrote: I'm trying to see whether I can do this without reading the full manual. Is it

Re: [Numpy-discussion] equality of empty arrays

2010-10-12 Thread Skipper Seabold
On Tue, Oct 12, 2010 at 7:40 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/10/12 Ian Goodfellow goodfellow@gmail.com: If the arrays are the same size or can be broadcasted to the same size, it returns true or false on an elementwise basis. If the arrays are not the same

Re: [Numpy-discussion] equality of empty arrays

2010-10-12 Thread Skipper Seabold
On Tue, Oct 12, 2010 at 12:32 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Oct 12, 2010 at 11:25, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/10/12 Skipper Seabold jsseab...@gmail.com: Some elaboration here? http://www.scipy.org/FAQ#head

[Numpy-discussion] bug in genfromtxt

2010-10-12 Thread Skipper Seabold
With names=True, if you specify the dtype manually and specify usecols, it doesn't grab the correct names along with the columns. Should be a simple fix, but haven't had time to write a patch yet. from stringIO import stringIO import numpy as np np.__version__ #1.5.0 s =

Re: [Numpy-discussion] short circuit != ?

2010-10-27 Thread Skipper Seabold
On Wed, Oct 27, 2010 at 9:37 AM, Johann Cohen-Tanugi co...@lpta.in2p3.fr wrote: On 10/27/2010 03:31 PM, Neal Becker wrote: Johann Cohen-Tanugi wrote: how about np.any(a!=b)  ?? On 10/27/2010 12:25 PM, Neal Becker wrote: Is there a way to get a short circuit != ? That is, compare 2

[Numpy-discussion] create an object array with named dtype

2010-11-04 Thread Skipper Seabold
I just ran into this and am kind of baffled. There are other ways I could do this so it's not a huge deal, but I'm wondering if this is a bug. I want a (named) structured array with an object dtype. Is this possible? For example In [68]: import numpy as np In [69]: A =

[Numpy-discussion] Catching and dealing with floating point errors

2010-11-08 Thread Skipper Seabold
I am doing some optimizations on random samples. In a small number of cases, the objective is not well-defined for a given sample (it's not possible to tell beforehand and hopefully won't happen much in practice). What is the most numpythonic way to handle this? It doesn't look like I can use

Re: [Numpy-discussion] Catching and dealing with floating point errors

2010-11-08 Thread Skipper Seabold
On Mon, Nov 8, 2010 at 3:14 PM, Skipper Seabold jsseab...@gmail.com wrote: I am doing some optimizations on random samples.  In a small number of cases, the objective is not well-defined for a given sample (it's not possible to tell beforehand and hopefully won't happen much in practice

Re: [Numpy-discussion] Catching and dealing with floating point errors

2010-11-08 Thread Skipper Seabold
On Mon, Nov 8, 2010 at 3:42 PM, Bruce Southey bsout...@gmail.com wrote: On 11/08/2010 02:17 PM, Skipper Seabold wrote: On Mon, Nov 8, 2010 at 3:14 PM, Skipper Seaboldjsseab...@gmail.com  wrote: I am doing some optimizations on random samples.  In a small number of cases, the objective

Re: [Numpy-discussion] Catching and dealing with floating point errors

2010-11-08 Thread Skipper Seabold
On Mon, Nov 8, 2010 at 3:45 PM, Warren Weckesser warren.weckes...@enthought.com wrote: On Mon, Nov 8, 2010 at 2:17 PM, Skipper Seabold jsseab...@gmail.com wrote: On Mon, Nov 8, 2010 at 3:14 PM, Skipper Seabold jsseab...@gmail.com wrote: I am doing some optimizations on random samples

Re: [Numpy-discussion] Catching and dealing with floating point errors

2010-11-08 Thread Skipper Seabold
On Mon, Nov 8, 2010 at 4:04 PM, Bruce Southey bsout...@gmail.com wrote: On 11/08/2010 02:52 PM, Skipper Seabold wrote: On Mon, Nov 8, 2010 at 3:42 PM, Bruce Southeybsout...@gmail.com  wrote: On 11/08/2010 02:17 PM, Skipper Seabold wrote: On Mon, Nov 8, 2010 at 3:14 PM, Skipper Seaboldjsseab

Re: [Numpy-discussion] Warning: invalid value encountered in subtract

2010-11-30 Thread Skipper Seabold
On Tue, Nov 30, 2010 at 1:34 PM, Keith Goodman kwgood...@gmail.com wrote: After upgrading from numpy 1.4.1 to 1.5.1 I get warnings like Warning: invalid value encountered in subtract when I run unit tests (or timeit) using python -c 'blah' but not from an interactive session. How can I tell

Re: [Numpy-discussion] Structured array? recarray? issue access by attribute name

2010-12-05 Thread Skipper Seabold
On Sun, Dec 5, 2010 at 10:44 PM, Wai Yip Tung tungwai...@yahoo.com wrote: I'm trying to use numpy to manipulate CSV file. I'm looking for feature similar to relational database. So I come across a class recarray that seems to meet my need. And then I see other references of structured array.

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-05 Thread Skipper Seabold
On Sun, Dec 5, 2010 at 10:56 PM, Wai Yip Tung tungwai...@yahoo.com wrote: I'm fairly new to numpy and I'm trying to figure out the right way to do things. Continuing on my question about using recarray as a relation. I have a recarray like this In [339]: arr = np.array([    .:     (1,

[Numpy-discussion] bug in genfromtxt with missing values?

2011-01-24 Thread Skipper Seabold
Am I misreading the docs or missing something? Consider the following adapted from here: http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html from StringIO import StringIO import numpy as np data = 1, 2, 3\n4, ,5 np.genfromtxt(StringIO(data), delimiter=,, names=a,b,c, missing_values=

Re: [Numpy-discussion] bug in genfromtxt with missing values?

2011-01-25 Thread Skipper Seabold
On Tue, Jan 25, 2011 at 11:17 AM, Pierre GM pgmdevl...@gmail.com wrote: On Jan 24, 2011, at 11:47 PM, Skipper Seabold wrote: Am I misreading the docs or missing something?  Consider the following adapted from here: http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html from

[Numpy-discussion] Different behavior for astype('str') in numpy 1.5.1 vs 1.6.0?

2011-02-21 Thread Skipper Seabold
I get a lot of errors and failures running our tests with most recent numpy trunk. One in particular (so far) seems to be a bug. In [1]: import numpy as np In [2]: np.__version__ Out[2]: '1.6.0.dev-c50af53' In [3]: tmp_arr = np.array([['black'],['white'],['other']]) In [4]:

Re: [Numpy-discussion] Different behavior for astype('str') in numpy 1.5.1 vs 1.6.0?

2011-02-21 Thread Skipper Seabold
On Mon, Feb 21, 2011 at 3:49 PM, Pauli Virtanen p...@iki.fi wrote: On Mon, 21 Feb 2011 15:09:05 -0500, Skipper Seabold wrote: [clip] Should I file a ticket? Yes. http://projects.scipy.org/numpy/ticket/1748 [clip] PS. Is there an incompatibility of numpy 1.5.1 and numpy 1.6.0 trunk

Re: [Numpy-discussion] (no subject)

2011-03-02 Thread Skipper Seabold
On Wed, Mar 2, 2011 at 5:25 PM, Alex Ter-Sarkissov ater1...@gmail.com wrote: hi, the question is probably very silly, but can't get my head around it Say I have an NxM numerical array. What I want is to obtain the row and column number of the smallest value(kinda like find command in Matlab).

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-05 Thread Skipper Seabold
On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen ro...@uw.edu wrote: The page http://docs.scipy.org/doc/numpy/user/basics.rec.html gives a good introduction to structured arrays. However, it says nothing about how

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-08 Thread Skipper Seabold
On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold jsseab...@gmail.com wrote: On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen ro

[Numpy-discussion] append_fields behavior with a (sort of) empty array

2011-03-08 Thread Skipper Seabold
First consider this example of column_stack import numpy as np x = np.random.random((5,1)) y = np.random.random((5,3)) arr = np.column_stack((x[[]], y)) # this fails which is expected arr = np.column_stack((x[:,[]], y)) # this happily works I guess because x[:,[]] # array([], shape=(5, 0),

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-09 Thread Skipper Seabold
On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold jsseab...@gmail.com wrote: On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers ralf.gomm

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-09 Thread Skipper Seabold
On Wed, Mar 9, 2011 at 8:13 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold jsseab...@gmail.com wrote: On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers ralf.gomm

Re: [Numpy-discussion] Multiple Linear Regression

2011-03-16 Thread Skipper Seabold
On Wed, Mar 16, 2011 at 2:53 AM, dileep kunjaai dileepkunj...@gmail.com wrote: Dear sir,  Can we do multiple linear regression(MLR)  in python is there any inbuilt function for MLR You might be interested in statsmodels http://statsmodels.sourceforge.net/ Skipper

Re: [Numpy-discussion] Extracting data from genfromtxt?

2011-03-18 Thread Skipper Seabold
On Fri, Mar 18, 2011 at 4:27 PM, Rohaq ro...@dearinternet.com wrote: I've got a CSV file with the following layout: Location,Result1,Result2 1,0,0 2,0,0 3,1,0 4,1,0 5,1,1 6,0,1 7,0,1 8,0,0 ...etc., and I've loaded it using the following: import numpy as np data =

Re: [Numpy-discussion] should get rid of the annoying numpy STDERR output

2011-03-24 Thread Skipper Seabold
On Thu, Mar 24, 2011 at 9:45 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: 2011/3/24 Dmitrey tm...@ukr.net: Hi 2011/3/24 Dmitrey tm...@ukr.net from numpy import inf, array inf*0 nan (ok) array(inf) * 0.0 StdErr: Warning: invalid value encountered in multiply nan My cycled

Re: [Numpy-discussion] should get rid of the annoying numpy STDERR output

2011-03-24 Thread Skipper Seabold
On Thu, Mar 24, 2011 at 10:52 AM, eat e.antero.ta...@gmail.com wrote: Hi On Thu, Mar 24, 2011 at 4:17 PM, Skipper Seabold jsseab...@gmail.com snip Also, as Robert pointed out to me before np.errstate is a context-manager for ignoring these warnings. I often wrap optimization code

[Numpy-discussion] Best dot product along an axis?

2011-04-04 Thread Skipper Seabold
Going through some of the recent threads on similar problems, I'm trying to discern which is best. I have X is T x i, theta is T x i x j. I want a T by j array that contains X[t].T.dot(theta[t]) along axis 0. Say, T,i,j = 166,7,3 X = np.random.random((T,i)) theta = np.random.random((T,i,j)) #

Re: [Numpy-discussion] Remove deprecated skiprows

2011-04-05 Thread Skipper Seabold
On Tue, Apr 5, 2011 at 6:05 PM, Pierre GM pgmdevl...@gmail.com wrote: On Apr 5, 2011, at 11:52 PM, Ralf Gommers wrote: On Tue, Apr 5, 2011 at 11:45 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sun, Apr 3, 2011 at 8:20 PM, Charles R Harris charlesr.har...@gmail.com wrote: Should

[Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Skipper Seabold
All, We noticed some failing tests for statsmodels between numpy 1.5.1 and numpy = 1.6.0. These are the versions where I noticed the change. It seems that when you divide a float array and multiply by a boolean array the answers are different (unless the others are also off by some floating

Re: [Numpy-discussion] Bug: np.linalg.qr crash the python interpreter if getting a shape (0, x) array.

2011-05-08 Thread Skipper Seabold
On Fri, May 6, 2011 at 11:30 AM, Till Stensitzki mail.t...@gmx.de wrote: Hi, discovered another small bug. Windows 7 32 bit, Python 2.6. In [1]: np.__version__ Out[1]: '1.5.1' In [2]: a=np.zeros((0,2)) In [3]: np.linalg.qr(a)  ** On entry to DGEQRF parameter number  4 had an illegal

Re: [Numpy-discussion] Bug: np.linalg.qr crash the python interpreter if getting a shape (0, x) array.

2011-05-08 Thread Skipper Seabold
On Sun, May 8, 2011 at 11:42 AM, Skipper Seabold jsseab...@gmail.com wrote: On Fri, May 6, 2011 at 11:30 AM, Till Stensitzki mail.t...@gmx.de wrote: Hi, discovered another small bug. Windows 7 32 bit, Python 2.6. In [1]: np.__version__ Out[1]: '1.5.1' In [2]: a=np.zeros((0,2)) In [3

Re: [Numpy-discussion] finding elements that match any in a set

2011-05-27 Thread Skipper Seabold
On Fri, May 27, 2011 at 12:48 PM, Michael Katz michaeladamk...@yahoo.com wrote: I have a numpy array, records, with named fields including a field named integer_field. I have an array (or list) of values of interest, and I want to get the indexes where integer_field has any of those values.

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Skipper Seabold
On Tue, May 31, 2011 at 9:31 PM, Benjamin Root ben.r...@ou.edu wrote: On Tue, May 31, 2011 at 8:18 PM, Warren Weckesser warren.weckes...@enthought.com wrote: On Tue, May 31, 2011 at 8:08 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've been contemplating new functions

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Skipper Seabold
On Tue, May 31, 2011 at 9:53 PM, Warren Weckesser warren.weckes...@enthought.com wrote: On Tue, May 31, 2011 at 8:36 PM, Skipper Seabold jsseab...@gmail.com wrote: I don't know if it's one pass off the top of my head, but I've used percentile for interpercentile ranges. [docs] [1]: X

Re: [Numpy-discussion] New functions.

2011-06-01 Thread Skipper Seabold
On Wed, Jun 1, 2011 at 11:31 AM, Mark Miller markperrymil...@gmail.com wrote: I'd love to see something like a count_unique function included. The numpy.unique function is handy, but it can be a little awkward to efficiently go back and get counts of each unique value after the fact. Does

Re: [Numpy-discussion] bincount limitations

2011-06-02 Thread Skipper Seabold
On Wed, Jun 1, 2011 at 10:10 PM, Alan G Isaac alan.is...@gmail.com wrote: On Thu, Jun 2, 2011 at 1:49 AM, Mark Millermarkperrymil...@gmail.com   wrote: Not quite. Bincount is fine if you have a set of approximately sequential numbers. But if you don't On 6/1/2011 9:35 PM, David

Re: [Numpy-discussion] bincount limitations

2011-06-02 Thread Skipper Seabold
On Thu, Jun 2, 2011 at 1:11 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, Jun 2, 2011 at 12:08, Skipper Seabold jsseab...@gmail.com wrote: On Wed, Jun 1, 2011 at 10:10 PM, Alan G Isaac alan.is...@gmail.com wrote: On Thu, Jun 2, 2011 at 1:49 AM, Mark Millermarkperrymil...@gmail.com

[Numpy-discussion] Numpy/Scipy Testing Guidelines URL?

2011-06-20 Thread Skipper Seabold
Are the testing guidelines included in the HTML docs anywhere? If I recall, they used to be, and I couldn't find them with a brief look/google. I'd like to link to them. Maybe the rendered rst page is considered their new home? https://github.com/numpy/numpy/blob/master/doc/TESTS.rst.txt Skipper

Re: [Numpy-discussion] Numpy/Scipy Testing Guidelines URL?

2011-06-20 Thread Skipper Seabold
On Mon, Jun 20, 2011 at 5:41 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Jun 20, 2011 at 11:36 PM, Skipper Seabold jsseab...@gmail.com wrote: Are the testing guidelines included in the HTML docs anywhere? If I recall, they used to be, and I couldn't find them with a brief

[Numpy-discussion] numpy submodules missing in intersphinx objects.inv?

2011-06-20 Thread Skipper Seabold
I was just trying to link to the numpy.testing module but can't using intersphinx. Does anyone know why certain submodules aren't included in objects.inv? It looks as though it has something to do either with having a reference at the top of the rst file (so you can :ref: link to it) or having

Re: [Numpy-discussion] Multiply along axis

2011-06-29 Thread Skipper Seabold
On Wed, Jun 29, 2011 at 10:32 AM, Robert Elsner ml...@re-factory.de wrote: Hello everyone, I would like to solve the following problem (preferably without reshaping / flipping the array a). Assume I have a vector v of length x and an n-dimensional array a where one dimension has length x

[Numpy-discussion] Two bugs in recfunctions.join_by with patch

2011-06-29 Thread Skipper Seabold
These two cases failed in recfunctions.join_by 1) the case for having either r1postfix or r2postfix as an empty string was not handled. 2) If there is more than one key and more than variable with a name collision. Patch and tests in a pull request here: https://github.com/numpy/numpy/pull/100

[Numpy-discussion] Moving lib.recfunctions?

2011-07-01 Thread Skipper Seabold
lib.recfunctions has never been fully advertised. The two bugs I just discovered lead me to believe that it's not that well vetted, but it is useful. I can't be the only one using these? What do people think of either deprecating lib.recfunctions or at least importing them into the numpy.rec

Re: [Numpy-discussion] Moving lib.recfunctions?

2011-07-01 Thread Skipper Seabold
On Fri, Jul 1, 2011 at 2:22 PM, josef.p...@gmail.com wrote: On Fri, Jul 1, 2011 at 1:59 PM, Skipper Seabold jsseab...@gmail.com wrote: lib.recfunctions has never been fully advertised. The two bugs I just discovered lead me to believe that it's not that well vetted, but it is useful. I can't

Re: [Numpy-discussion] Moving lib.recfunctions?

2011-07-01 Thread Skipper Seabold
On Fri, Jul 1, 2011 at 3:05 PM, Benjamin Root ben.r...@ou.edu wrote: On Fri, Jul 1, 2011 at 12:59 PM, Skipper Seabold jsseab...@gmail.com wrote: lib.recfunctions has never been fully advertised. The two bugs I just discovered lead me to believe that it's not that well vetted

Re: [Numpy-discussion] Moving lib.recfunctions?

2011-07-05 Thread Skipper Seabold
On Fri, Jul 1, 2011 at 2:32 PM, Skipper Seabold jsseab...@gmail.com wrote: On Fri, Jul 1, 2011 at 2:22 PM,  josef.p...@gmail.com wrote: On Fri, Jul 1, 2011 at 1:59 PM, Skipper Seabold jsseab...@gmail.com wrote: lib.recfunctions has never been fully advertised. The two bugs I just discovered

Re: [Numpy-discussion] Moving lib.recfunctions?

2011-07-05 Thread Skipper Seabold
On Tue, Jul 5, 2011 at 2:46 PM, Pierre GM pgmdevl...@gmail.com wrote: On Jul 5, 2011, at 8:33 PM, Skipper Seabold wrote: On Fri, Jul 1, 2011 at 2:32 PM, Skipper Seabold jsseab...@gmail.com wrote: On Fri, Jul 1, 2011 at 2:22 PM,  josef.p...@gmail.com wrote: On Fri, Jul 1, 2011 at 1:59 PM

Re: [Numpy-discussion] NA/Missing Data Conference Call Summary

2011-07-06 Thread Skipper Seabold
On Wed, Jul 6, 2011 at 7:14 PM, Christopher Jordan-Squire cjord...@uw.edu wrote: On Wed, Jul 6, 2011 at 3:47 PM, josef.p...@gmail.com wrote: On Wed, Jul 6, 2011 at 4:38 PM,  josef.p...@gmail.com wrote: On Wed, Jul 6, 2011 at 4:22 PM, Christopher Jordan-Squire snip Mean value replacement, or

Re: [Numpy-discussion] code review/build test for datetime business day API

2011-07-25 Thread Skipper Seabold
2011/7/25 Stéfan van der Walt ste...@sun.ac.za: On Mon, Jul 25, 2011 at 2:11 PM, Charles R Harris charlesr.har...@gmail.com wrote: It's just asking for import problems and general confusion to shadow a Python module, that's why we renamed io to npyio. Why?  Users can simply do import

Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Skipper Seabold
On Tue, Aug 2, 2011 at 3:19 PM, Craig Yoshioka crai...@me.com wrote: duplicate column in dtype? Duplicate field names given.? Can you post code to replicate? I just consolidated some of the columns and the error went away... none had duplicate field names... hence the question. I don't

Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Skipper Seabold
On Tue, Aug 2, 2011 at 4:09 PM, Craig Yoshioka crai...@me.com wrote: yup, duplicate field names given.  I didn't commit the non-working version and I didn't want to mess up my working code so I tried duplicating the dtype in a new file and couldn't recreate the error.   I suppose the answer

Re: [Numpy-discussion] numpydoc - latex longtables error

2011-08-10 Thread Skipper Seabold
On Wed, Aug 10, 2011 at 3:28 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, I think this one might be for Pauli. I've run into an odd problem that seems to be an interaction of numpydoc and autosummary and large classes. In summary, large classes and numpydoc lead to large tables of

Re: [Numpy-discussion] summing an array

2011-08-18 Thread Skipper Seabold
On Thu, Aug 18, 2011 at 10:19 AM, Chris Withers ch...@simplistix.co.uk wrote: Hi All, Hopefully a simple newbie question, if I have an array such as : array([0, 1, 2, 3, 4]) ...what's the best way to cummulatively sum it so that I end up with: array([0, 1, 3, 6, 10]) How would I do this

Re: [Numpy-discussion] Identifying Colinear Columns of a Matrix

2011-08-26 Thread Skipper Seabold
On Fri, Aug 26, 2011 at 1:10 PM, Mark Janikas mjani...@esri.com wrote: Hello All, I am trying to identify columns of a matrix that are perfectly collinear. It is not that difficult to identify when two columns are identical are have zero variance, but I do not know how to ID when the

[Numpy-discussion] Bug in numpy std, etc. with other data structures?

2011-09-17 Thread Skipper Seabold
Just ran into this. Any objections for having numpy.std and other functions in core/fromnumeric.py call asanyarray before trying to use the array's method? Other data structures like pandas and larry define their own std method, for instance, and this doesn't allow them to pass through. I'm

[Numpy-discussion] why doesn't numpy.distutils find ATLAS?

2011-09-21 Thread Skipper Seabold
I have installed numpy with my own ATLAS, but trying to install PyMC, it can't find the ATLAS libs. I also have an older package that formerly installed but no longer does. I'm being a bit lazy, but am I missing something? Briefly checking, it looks like the conventions/assumptions for site.cfg in

Re: [Numpy-discussion] speeding up operations on small vectors

2011-10-11 Thread Skipper Seabold
On Tue, Oct 11, 2011 at 11:57 AM, Christoph Groth c...@falma.de wrote: Pauli Virtanen p...@iki.fi writes: Thank you for your suggestion.  It doesn't help me however, because the algorithm I'm _really_ trying to speed up cannot be vectorized with numpy in the way you vectorized my toy example.

Re: [Numpy-discussion] speeding up operations on small vectors

2011-10-11 Thread Skipper Seabold
On Tue, Oct 11, 2011 at 12:41 PM, Christoph Groth c...@falma.de wrote: Skipper Seabold jsseab...@gmail.com writes: So it's the dot function being called repeatedly on smallish arrays that's the bottleneck? I've run into this as well. See this thread [1]. (...) Thanks for the links.  tokyo

Re: [Numpy-discussion] wanted: decent matplotlib alternative

2011-10-13 Thread Skipper Seabold
On Thu, Oct 13, 2011 at 6:22 PM, Gökhan Sever gokhanse...@gmail.com wrote: On Thu, Oct 13, 2011 at 4:15 PM, Benjamin Root ben.r...@ou.edu wrote: Myself and other developers would greatly appreciate help from the community to point out which examples are too confusing or out of date. We It

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Skipper Seabold
On Fri, Oct 14, 2011 at 2:18 PM, Alan G Isaac alan.is...@gmail.com wrote: On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: If I remember correctly, signal.lfilter doesn't require stationarity, but handling of the starting values is a bit difficult. Hmm.  Yes. AR(1) is trivial, but how

  1   2   3   >