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

2011-06-15 Thread Derek Homeier
On 15.06.2011, at 1:34AM, Mark Wiebe wrote: These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 and for those that don't want to dig into review C code, the commit for the documentation is here:

Re: [Numpy-discussion] ANN: Numpy 1.6.1 release candidate 1

2011-06-13 Thread Derek Homeier
Hi Ralf, I am pleased to announce the availability of the first release candidate of NumPy 1.6.1. This is a bugfix release, list of fixed bugs: #1834 einsum fails for specific shapes #1837 einsum throws nan or freezes python for specific array shapes #1838 object - structured type

Re: [Numpy-discussion] ANN: Numpy 1.6.1 release candidate 1

2011-06-13 Thread Derek Homeier
Hi Ralf, FAIL: Test custom format function for each element in array. -- This test is not in 1.6.x, only in master. I suspect the same is true for the datetime tests, but perhaps not for the S5/U5 thing. Can you clean

Re: [Numpy-discussion] ANN: Numpy 1.6.1 release candidate 1

2011-06-13 Thread Derek Homeier
On 13.06.2011, at 6:19PM, Ralf Gommers wrote: I used wget using the direct link and it eventually got the complete file after multiple tries. Yes, SF is having a pretty bad day. I eventually also got the tarball through the fink/debian mirror list; no failures on OS X 10.5 i386. There

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
Hi Chris, On 31 May 2011, at 13:56, cgraves wrote: I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin option, however neither genfromtxt nor recfromtxt, which use loadtxt, have it. Should they have inherited the option? Who can make it happen? you are mistaken, genfromtxt

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 17:33, Bruce Southey wrote: It certainly would make sense to provide the same functionality for genfromtxt (which should then be inherited by [nd,ma,rec]fromtxt), so I'd go ahead and file a feature (enhancement) request. I can't promise I can take care of it myself,

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 17:45, Benjamin Root wrote: At this point, I wonder if it might be smarter to create a .atleast_Nd() function and use that everywhere it is needed. Having similar logic tailored for each loading function might be a little dangerous if bug fixes are made to one, but

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 18:25, Pierre GM wrote: On May 31, 2011, at 5:52 PM, Derek Homeier wrote: I think stuff like multiple delimiters should have been dealt with before, as the right place to insert the ndmin code (which includes the decision to squeeze or not to squeeze as well as to add

Re: [Numpy-discussion] Numpy question

2011-05-26 Thread Derek Homeier
On 26 May 2011, at 11:17, Talla wrote: Below is the output of the coammands you mentioned. C:\python Python 2.6.2 (r262:71600, Jul 7 2009, 20:21:09) [MSC v.1500 32 bit (Intel)] on win3 Type help, copyright, credits or license for more information. import numpy print(numpy.arange(3))

Re: [Numpy-discussion] How can Import DATA from a Fortran file

2011-05-18 Thread Derek Homeier
On 19.05.2011, at 12:47AM, Aradenatorix Veckhom Vacelaevus wrote: I have a file in simple text with information obtained in Fortran 77 and I need to use the data inside for visualize with Mayavi. I was fighting for a while with the VTK simple legacy format. Finally I could run an small

Re: [Numpy-discussion] Creating a 1-d structured array

2011-05-13 Thread Derek Homeier
Hi, just a comment since I first thought the solution below might not be what Bruce was looking for, but having realised it's probably what he's been asking for... On 13 May 2011, at 17:20, josef.p...@gmail.com wrote: On Fri, May 13, 2011 at 10:58 AM, Bruce Southey bsout...@gmail.com

Re: [Numpy-discussion] Creating a 1-d structured array

2011-05-13 Thread Derek Homeier
On 13 May 2011, at 22:04, josef.p...@gmail.com wrote: Thus I am wondering why broadcasting should not be possible in this case, Even a 1 column table is still a table (or a list of records), and a 1 item row is still a row. True, but even multiplying the shape (6, ) array e.g. with a shape

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-06 Thread Derek Homeier
On 6 May 2011, at 07:53, Ralf Gommers wrote: Looks okay, and I agree that it's better to fix it now. The timing is a bit unfortunate though, just after RC2. I'll have closer look tomorrow and if it can go in, probably tag RC3. If in the meantime a few more people could test this, that

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Derek Homeier
On 5 May 2011, at 22:53, Derek Homeier wrote: However, the problem that ndmin is supposed to address is not fixed by the current implementation for the rc. Essentially, a single- row, multi-column file with ndmin=2 comes out as a Nx1 array which is the same result for a multi-row, single

Re: [Numpy-discussion] ANN: Numpy 1.6.0 release candidate 2

2011-05-04 Thread Derek Homeier
On 04.05.2011, at 8:42PM, Ralf Gommers wrote: == FAIL: test_return_character.TestF90ReturnCharacter.test_all -- Traceback (most recent call last): File

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Derek Homeier
Hi Paul, I've got back to your suggestion re. the ndmin flag for loadtxt from a few weeks ago... On 27.03.2011, at 12:09PM, Paul Anton Letnes wrote: 1562: I attach a possible patch. This could also be the default behavior to my mind, since the function caller can simply call

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Derek Homeier
On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote: But: Isn't the numpy.atleast_2d and numpy.atleast_1d functions written for this? Shouldn't we reuse them? Perhaps it's overkill, and perhaps it will reintroduce the 'transposed' problem? Yes, good point, one could replace the X.shape =

Re: [Numpy-discussion] ANN: Numpy 1.6.0 release candidate 2

2011-05-03 Thread Derek Homeier
Hi Ralf, I am pleased to announce the availability of the second release candidate of NumPy 1.6.0. Compared to the first release candidate, one segfault on (32-bit Windows + MSVC) and several memory leaks were fixed. If no new problems are reported, the final release will be in one week.

Re: [Numpy-discussion] strange behavior of np.minimum and np.maximum

2011-04-06 Thread Derek Homeier
Hi Emmanuelle, a, b, c = np.array([10]), np.array([2]), np.array([7]) min_val = np.minimum(a, b, c) min_val array([2]) max_val = np.maximum(a, b, c) max_val array([10]) min_val array([10]) (I'm using numpy 1.4, and I observed the same behavior with numpy 2.0.0.dev8600 on another

Re: [Numpy-discussion] How to create structured char arrays?

2011-04-04 Thread Derek Homeier
Hi Bruce, I think that I have resolved my issue down to creating a structured string array. I am using numpy version '2.0.0.dev-3c338cb'. Without a structured array, it should be a 2 by 2 array: np.array([('a','b'),('c','d')]) array([['a', 'b'], ['c', 'd']], dtype='|S1')

Re: [Numpy-discussion] python3 setup.py install fails with git maint/1.6.x

2011-04-04 Thread Derek Homeier
On 4 Apr 2011, at 21:41, Darren Dale wrote: Just tried again with python3.2 and 1.6.0b2, installs fine. The line it fails on is only reached when a numpy/version.py exists, which is the case for source releases or if you did not clean your local git repo before building. ... but I think

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 2

2011-04-04 Thread Derek Homeier
Hi all, On 4 Apr 2011, at 22:04, Ralf Gommers wrote: I am pleased to announce the availability of the second beta of NumPy 1.6.0. Due to the extensive changes in the Numpy core for this release, the beta testing phase will last at least one month. Please test this beta and report any

Re: [Numpy-discussion] loadtxt/savetxt tickets

2011-03-31 Thread Derek Homeier
On 31 Mar 2011, at 17:03, Bruce Southey wrote: This is an invalid ticket because the docstring clearly states that in 3 different, yet critical places, that missing values are not handled here: Each row in the text file must have the same number of values. genfromtxt : Load data with

Re: [Numpy-discussion] Old tickets

2011-03-30 Thread Derek Homeier
On 30 Mar 2011, at 23:26, Benjamin Root wrote: Ticket 301: 'Make power and divide return floats from int inputs (like true_divide)' http://projects.scipy.org/numpy/ticket/301 Invalid because the output dtype is the same as the input dtype unless you override using the dtype argument:

Re: [Numpy-discussion] Old tickets

2011-03-30 Thread Derek Homeier
Hi, On 30 Mar 2011, at 21:37, Bruce Southey wrote: Ticket 1071: 'loadtxt fails if the last column contains empty value' http://projects.scipy.org/numpy/ticket/1071 Invalid mainly because loadtxt states that 'Each row in the text file must have the same number of values.' So of cause loadtxt

Re: [Numpy-discussion] loadtxt/savetxt tickets

2011-03-26 Thread Derek Homeier
Hi, On 26 Mar 2011, at 14:36, Pauli Virtanen wrote: On Sat, 26 Mar 2011 13:11:46 +0100, Paul Anton Letnes wrote: [clip] I hope you find this useful! Is there some way of submitting the patches for review in a more convenient fashion than e-mail? You can attach them on the trac to each

Re: [Numpy-discussion] loadtxt/savetxt tickets

2011-03-26 Thread Derek Homeier
Hi again, On 26 Mar 2011, at 15:20, Derek Homeier wrote: 1562: I attach a possible patch. This could also be the default behavior to my mind, since the function caller can simply call numpy.squeeze if needed. Changing default behavior would probably break old code, Seems the fastest

Re: [Numpy-discussion] loadtxt/savetxt tickets

2011-03-26 Thread Derek Homeier
Hi Paul, having had a look at the other tickets you dug up, My opinions are my own, and in detail, they are: 1752: I attach a possible patch. FWIW, I agree with the request. The patch is written to be compatible with the fix in ticket #1562, but I did not test that yet. Tested, see

Re: [Numpy-discussion] how to delete a particular column or row from numpy array based on some rule or value

2011-03-24 Thread Derek Homeier
In a numpy array of m x n size, I would like to delete few rows when a given element in that row is ‘nan’ or say any other value. For e.g. as in example given below, if I wish to delete a row when the 3rd element of row is zero, or if 3rd, 4th, 5th element are zero or either of 3rd,

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 1

2011-03-24 Thread Derek Homeier
On 24.03.2011, at 9:11AM, Pearu Peterson wrote: Intel-64bit: ERROR: test_assumed_shape.TestAssumedShapeSumExample.test_all -- Traceback (most recent call last): File /sw/lib/python3.2/site-packages/nose/case.py, line 372,

Re: [Numpy-discussion] [SciPy-Dev] ANN: Numpy 1.6.0 beta 1

2011-03-23 Thread Derek Homeier
Hi Bruce, Sorry as I should I have paid more attention to you first email as I raised this on the numpy list. (At least with gmail, the reply is to the scipy-dev list rather than the numpy list.) Based on Pauli's answer I got around it by commenting out a line in the setup.py file

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 1

2011-03-23 Thread Derek Homeier
Hi again, On 23 Mar 2011, at 17:07, Ralf Gommers wrote: I am pleased to announce the availability of the first beta of NumPy 1.6.0. Due to the extensive changes in the Numpy core for this release, the beta testing phase will last at least one month. Please test this beta and report any

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 1

2011-03-23 Thread Derek Homeier
On 24 Mar 2011, at 00:34, Derek Homeier wrote: tests with the fink-installed pythons on MacOS X mostly succeeded, with one failure in python2.4 and a couple of issues seemingly related to PPC floating point accuracy, as below: Probably last update for tonight: with the 'full' test suite

<    1   2