Re: [Numpy-discussion] recfunctions

2014-02-24 Thread Pierre GM
On February 25, 2014 at 01:26:51 , Charles R Harris (charlesr.har...@gmail.com) wrote: Hi All, Does anyone recall if it was a deliberate choice to not expose recfunctions in the lib package? This is apropos issue #4242. Yes. This job was a rip-off of John Hunter’s similar functions on

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

2013-07-14 Thread Pierre GM
On Jul 13, 2013, at 13:36 , Gregorio Bastardo gregorio.basta...@gmail.com wrote: Hi Stéfan, Thanks for the suggestion, but it does not protect the array: Thinking about it, it can't: when `x` is a MaskedArray, `x.data` is just a view of the underlying array as a regular ndarray. As far as

Re: [Numpy-discussion] saving 3d array

2013-06-15 Thread Pierre GM
On Jun 15, 2013, at 17:35 , Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Jun 15, 2013 at 2:51 PM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: Thank you very much for this tip. Is there a typical way to save masked and the rest separately?. Not much familiar with array

Re: [Numpy-discussion] time to revisit NA/ma ideas

2013-06-15 Thread Pierre GM
On Jun 15, 2013, at 20:38 , Benjamin Root ben.r...@ou.edu wrote: On Fri, Jun 14, 2013 at 6:38 PM, Eric Firing efir...@hawaii.edu wrote: A nice summary of the discussions from a year ago is here: http://www.numpy.org/NA-overview.html It provides food for thought. Eric Perhaps a

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Pierre GM
--Pierre GMSent with AirmailOn June 12, 2013 at 14:10:27, Nathaniel Smith (n...@pobox.com) wrote: Hi all,It looks like we've gotten a bit confused and need to untanglesomething. There's a PR to add new functions 'np.filled' and'np.filled_like':https://github.com/numpy/numpy/pull/2875And there was

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Pierre GM
On June 12, 2013 at 17:56:33, Daπid (davidmen...@gmail.com) wrote: On 12 June 2013 17:29, josef.p...@gmail.com wrote: +2 on this. I like a good name like `filled` for a function that I expect to use regularly. it's short and descriptive.FTIW, I am for this one too. That is not only clear, but a

[Numpy-discussion] Re: empty_like for masked arrays

2013-06-11 Thread Pierre GM
On June 11, 2013 at 00:40:31, Pierre GM (pgmdevl...@gmail.com) wrote: On June 10, 2013 at 23:07:24 , Eric Firing (efir...@hawaii.edu) wrote:On 2013/06/10 10:17 AM, Aldcroft, Thomas wrote: I use np.ma http://np.ma, and for me the most intuitive would be the second option where the new array matches

[Numpy-discussion] Re: empty_like for masked arrays

2013-06-10 Thread Pierre GM
On June 10, 2013 at 23:07:24 , Eric Firing (efir...@hawaii.edu) wrote: On 2013/06/10 10:17 AM, Aldcroft, Thomas wrote: I use np.ma http://np.ma, and for me the most intuitive would be the second option where the new array matches the original array in shape and dtype, but always has an

[Numpy-discussion] Re: genfromtxt() skips comments

2013-05-31 Thread Pierre GM
On May 31, 2013 at 23:08:18 , Albert Kottke (albert.kot...@gmail.com) wrote: I noticed that genfromtxt() did not skip comments if the keyword names is not True. If names is True, then genfromtxt() would take the first line as the names. I am proposing a fix to genfromtxt that skips all of the

Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

2012-08-07 Thread Pierre GM
your PYTHONPATH Good luck -- Pierre GM On Tuesday, August 7, 2012 at 08:15 , Andrew Nelson wrote: Dear list, I am trying to build numpy 1.6.2 from source but am running up against a few problems. Platform: OSX10.6.8 Python: 2.7.3 (compiled using gcc 4.2.1) gcc: 4.2.1 gfortran: 4.2.1 I try

Re: [Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

2012-07-17 Thread Pierre GM
On Tuesday, July 17, 2012 at 17:47 , Nathaniel Smith wrote: I guess I still have a small preference for skip_header=comments over skip_header=True, since the latter is more opaque for no purpose. Also it makes me slightly antsy since skip_header is normally an integer, and True is, in fact,

Re: [Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

2012-07-16 Thread Pierre GM
Hello, I'm siding w/ Tom, Nathaniel and Travis. I don't think the change as it is is advisable. It's a regression, and breaking=bad. Now, I can understand your frustration, so, what about a trade-off? The first line w/ a comment after the first 'skip_header' ones should be parsed for column titles

Re: [Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

2012-07-16 Thread Pierre GM
To be ultra clear (since I want to code this), you are suggesting that 'first_commented_line' be a *new* accepted value for the kwarg 'names', to invoke the behaviour you suggest? Nope, I was just referring to some hypothetical variable name. I meant that: first_values = None try: while not

Re: [Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

2012-07-16 Thread Pierre GM
Well, as `skip_header` is a number of lines, I don't really see anything particular magical about a `skip_header=-1`. Plus, range(-1) == [], while range(comments) raises a TypeError. And then you'd have to figure why the exception was raised. -- Pierre GM On Monday, July 16, 2012 at 21:56

Re: [Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

2012-07-16 Thread Pierre GM
in that case ? 6 ? 3 ? So, instead of using a `split`, maybe we should just check index=first_line.index(comment) and take `first_line[:index]` (or `first_line[index+1:]` after depending on the case). But then again, it's a weird case. -- Pierre GM On Monday, July 16, 2012 at 22:00

Re: [Numpy-discussion] Istalling Numpy and Scipy on preinstalled Python 2.6 on Mac

2012-07-15 Thread Pierre GM
`your_path_to_your_python_version setup install --user` Let me know how it goes -- Pierre GM On Friday, July 13, 2012 at 19:22 , Naser Nikandish wrote: Hi, I need to install numpy and scipy on preinstalled Python 2.6 on my Mac Lion. Is there anyway to do it? I am aware that Lion OS comes with Python 2.7

[Numpy-discussion] masked and missing values, a historical perspective and some comments

2012-05-16 Thread Pierre GM
All, I’ve been fairly quiet on the various missing/masked values proposals, sorry about that. I figured I would take the opportunity of Travis O.’s deadline of Wed. 16th to put some aspects of numpy.ma in a semi-historical, semi-personal perspective. Apologies in advance if I misrepresent some

Re: [Numpy-discussion] change masked array member values with conditional selection

2012-04-12 Thread Pierre GM
Ciao Chao, That known quirk deserves to be better documented, I agree. There's a simple explanation for this behavior: Because `a` is a masked array, `(a 5)` is also a masked array with dtype=np.bool, and whose mask is the same as `a`'s. In your example, that's: masked_array(data = [-- -- --

Re: [Numpy-discussion] Question on numpy.ma.masked_values

2012-03-20 Thread Pierre GM
/ticket/2082 On Thu, Mar 15, 2012 at 1:24 PM, Gökhan Sever gokhanse...@gmail.com wrote: On Thu, Mar 15, 2012 at 1:12 PM, Pierre GM pgmdevl...@gmail.com wrote: Ciao Gökhan, AFAIR, shrink is used only to force a collapse of a mask full of False, not to force the creation of such a mask

Re: [Numpy-discussion] Recovering from a STOP ?

2012-03-20 Thread Pierre GM
Pauli, Chris, Thanks for your inputs. Pauli, I think that when f2py encounters a STOP statement, it just stops the execution of the process. Alas, it's the same process as the interpreter... So we need a trick not to interrupt the whole process. I eventually resorted to patching f2py as

Re: [Numpy-discussion] Question on numpy.ma.masked_values

2012-03-15 Thread Pierre GM
Ciao Gökhan, AFAIR, shrink is used only to force a collapse of a mask full of False, not to force the creation of such a mask. Now, it should work as you expected, meaning that it needs to be fixed. Could you open a ticket? And put me in copy, just in case. Anyhow: Your trick is a tad dangerous,

[Numpy-discussion] Recovering from a STOP ?

2012-03-14 Thread Pierre GM
THYC Dear all, I'm working with some large inherited F90 code that needs to be wrapped in Python. if the code base itself cannot be modified (it's a static archive), some additional F90 files were written to help the interaction with the code. Writing a python extension combining the archive

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-07 Thread Pierre GM
On Dec 07, 2011, at 11:24 , Pierre Haessig wrote: Now for my personal use, I was not so frustrated by loading performance but rather by NA support, so I wrote my own loadCsv function to get a masked array. It was nor beautiful, neither very efficient, but it does the job ! Ever tried to

Re: [Numpy-discussion] Preventing an ndarray subclass from returning new subclass instances for std(), etc

2011-09-19 Thread Pierre GM
Anyway, back on topic - I'm having similar problems as Keith. It seems like there isn't consistency on how different built-in functions treat array_wrap/finalize/etc, or maybe I'm still confused. Actually, that depends on the np function you need. Functions like np.std… first call the

Re: [Numpy-discussion] Preventing an ndarray subclass from returning new subclass instances for std(), etc

2011-09-18 Thread Pierre GM
On Sep 18, 2011, at 21:25 , Stéfan van der Walt wrote: On Sun, Sep 18, 2011 at 9:48 AM, Keith Hughitt keith.hugh...@gmail.com wrote: Interesting. It works as expected when called as a method: In [10]: x = np.ma.array([[1,2,3]]) In [11]: x.std() Out[11]: 0.81649658092772603 I'm

Re: [Numpy-discussion] load from text files Pull Request Review

2011-09-13 Thread Pierre GM
On Sep 13, 2011, at 01:38 , Christopher Jordan-Squire wrote: I did some timings to see what the advantage would be, in the simplest case possible, of taking multiple lines from the file to process at a time. Assuming the dtype is already known. The code is attached. What I found was I can't

Re: [Numpy-discussion] A question about dtype syntax

2011-08-31 Thread Pierre GM
On Aug 31, 2011, at 12:20 PM, Jean-Baptiste Marquette wrote: Hi Pierre, Thanks for the guess. Unfortunately, I got the same error: [('bs3000k.cat', 280.60341, -7.09118, 9480, 0.2057, 0.14)] Traceback (most recent call last): File /Users/marquett/workspace/Distort/src/StatsSep.py,

Re: [Numpy-discussion] A question about dtype syntax

2011-08-31 Thread Pierre GM
On Aug 31, 2011, at 3:40 PM, Jean-Baptiste Marquette wrote: Traceback (most recent call last): File /Users/marquett/workspace/Distort/src/StatsSep.py, line 44, in module np.savetxt(Table, StatsAll, delimiter=' ', fmt=['%15s %.5f %.5f %5d %.4f %.4f']) File

Re: [Numpy-discussion] A question about dtype syntax

2011-08-31 Thread Pierre GM
On Aug 31, 2011, at 4:24 PM, Jean-Baptiste Marquette wrote: Hi Pierre, On Aug 31, 2011, at 3:40 PM, Jean-Baptiste Marquette wrote: Traceback (most recent call last): File /Users/marquett/workspace/Distort/src/StatsSep.py, line 44, in module np.savetxt(Table, StatsAll,

Re: [Numpy-discussion] A question about dtype syntax

2011-08-30 Thread Pierre GM
On Aug 30, 2011, at 10:46 AM, Marquette Jean-Baptiste wrote: Hi all, I have this piece of code: Stats = [CatBase, round(stats.mean(Data.Ra), 5), round(stats.mean(Data.Dec), 5), len(Sep), round(stats.mean(Sep),4), round(stats.stdev(Sep),4)] print Stats if First: StatsAll =

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

2011-08-02 Thread Pierre GM
On Aug 2, 2011, at 1:20 AM, Craig Yoshioka wrote: Is there a limit to the number of fields a numpy recarray can have? I was getting a strange error about a duplicate column name, but it wasn't a duplicate. And the error was… ? ___

Re: [Numpy-discussion] boolean array indexing and broadcasting rules

2011-07-29 Thread Pierre GM
On Jul 29, 2011, at 4:07 PM, Mark Wiebe wrote: As part of supporting the NA mask, I've rewritten boolean indexing. Here's a timing comparison of my version versus a previous version: In [2]: np.__version__ Out[2]: '1.4.1' In [3]: a = np.zeros((1000,1000)) In [4]: mask =

Re: [Numpy-discussion] using the same vocabulary for missing value ideas

2011-07-07 Thread Pierre GM
On Jul 7, 2011, at 8:46 AM, Eric Firing wrote: On 07/06/2011 07:51 PM, Chris Barker wrote: On 7/6/11 11:57 AM, Mark Wiebe wrote: On Wed, Jul 6, 2011 at 1:25 PM, Christopher Barker Is this really true? if you use a bitpattern for IGNORE, haven't you just lost the ability to get the

Re: [Numpy-discussion] using the same vocabulary for missing value ideas

2011-07-06 Thread Pierre GM
Ah, semantics... On Jul 6, 2011, at 5:40 PM, Mark Wiebe wrote: NA (Not Available) A placeholder for a value which is unknown to computations. That value may be temporarily hidden with a mask, may have been lost due to hard drive corruption, or gone for any number of reasons.

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

2011-07-06 Thread Pierre GM
On Jul 6, 2011, at 10:11 PM, Bruce Southey wrote: On 07/06/2011 02:38 PM, Christopher Jordan-Squire wrote: On Wed, Jul 6, 2011 at 11:38 AM, Christopher Barker chris.bar...@noaa.gov wrote: Christopher Jordan-Squire wrote: If we follow those rules for IGNORE for all computations, we

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

2011-07-05 Thread Pierre GM
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, Skipper Seabold jsseab...@gmail.com wrote: lib.recfunctions has never

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

2011-07-05 Thread Pierre GM
On Jul 5, 2011, at 9:23 PM, Skipper Seabold wrote: On Tue, Jul 5, 2011 at 2:46 PM, Pierre GM pgmdevl...@gmail.com wrote: ... Hello, The idea behin having a lib.recfunctions and not a rec.recfunctions or whatever was to illustrate that the functions of this package are more generic

Re: [Numpy-discussion] alterNEP - was: missing data discussion round 2

2011-07-01 Thread Pierre GM
On Jul 1, 2011 7:14 PM, Mark Wiebe mwwi...@gmail.com wrote: On Fri, Jul 1, 2011 at 10:15 AM, Nathaniel Smith n...@pobox.com wrote: On Fri, Jul 1, 2011 at 7:09 AM, Mark Wiebe mwwi...@gmail.com wrote: On Fri, Jul 1, 2011 at 6:58 AM, Matthew Brett matthew.br...@gmail.com wrote: Do you see

Re: [Numpy-discussion] An NA compromise idea -- many-NA

2011-07-01 Thread Pierre GM
Mask an array with NAs? You should be able to, as IGNORENA. Mask an array with a view? That's sharing the data with a different mask, you should be able to, too (np.ma works like that). Sharing mask? That'd be great if we could... That way, there'd be almost nothing left to do to adapt np.ma... On

Re: [Numpy-discussion] alterNEP - was: missing data discussion round 2

2011-06-30 Thread Pierre GM
On Jun 30, 2011, at 3:31 PM, Matthew Brett wrote: ### A alternative-NEP on masking and missing values ### I like the idea of two different special values, np.NA for missing values, np.IGNORE for masked

Re: [Numpy-discussion] alterNEP - was: missing data discussion round 2

2011-06-30 Thread Pierre GM
On Jun 30, 2011, at 5:38 PM, Matthew Brett wrote: Hi, On Thu, Jun 30, 2011 at 2:58 PM, Pierre GM pgmdevl...@gmail.com wrote: On Jun 30, 2011, at 3:31 PM, Matthew Brett wrote: ### A alternative-NEP on masking and missing values

Re: [Numpy-discussion] missing data discussion round 2

2011-06-29 Thread Pierre GM
Matthew, Dag, +1. On Jun 29, 2011 4:35 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 06/29/2011 03:45 PM, Matthew Brett wrote: Hi, On Wed, Jun 29, 2011 at 12:39 AM, Mark Wiebemwwi...@gmail.com wrote: On Tue, Jun 28, 2011 at 5:20 PM, Matthew Brettmatthew.br...@gmail.com wrote:

Re: [Numpy-discussion] missing data discussion round 2

2011-06-28 Thread Pierre GM
On Jun 28, 2011, at 9:41 PM, Eric Firing wrote: One of the real frustrations of the present masked array is that there is no savez/load support. I could roll my own by using a convention like saving the mask of xxx as xxx__mask__, and then reversing the process in a modified load; but I

Re: [Numpy-discussion] missing data discussion round 2

2011-06-28 Thread Pierre GM
All, I'm not sure I understand some aspects of Mark's new proposal, sorry (blame the lack of sleep). I'm pretty excited with the idea of built-in NA like np.dtype(NA['float64']), provided we can come with some shortcuts like np.nafloat64. I think that would really take care of the missing data

Re: [Numpy-discussion] missing data discussion round 2

2011-06-28 Thread Pierre GM
On Jun 29, 2011, at 1:37 AM, Mark Wiebe wrote: On Tue, Jun 28, 2011 at 3:45 PM, Pierre GM pgmdevl...@gmail.com wrote: ... I think that would really take care of the missing data part in a consistent and non-ambiguous way. However, I understand that if a choice would be made

Re: [Numpy-discussion] missing data discussion round 2

2011-06-28 Thread Pierre GM
On Jun 29, 2011, at 1:39 AM, Mark Wiebe wrote: On Tue, Jun 28, 2011 at 5:20 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Tue, Jun 28, 2011 at 4:06 PM, Nathaniel Smith n...@pobox.com wrote: ... (You might think, what difference does it make if you *can* unmask an item? Us

Re: [Numpy-discussion] missing data discussion round 2

2011-06-27 Thread Pierre GM
On Jun 27, 2011, at 9:59 PM, josef.p...@gmail.com wrote: Just a question how things would work with the new model. How can you implement the use keyword from R's cov (or cor), with minimal data copying I think the basic masked array version would (or does) just assign 0 to the missing

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-25 Thread Pierre GM
This thread is getting quite long, innit ? And I think it's getting a tad confusing, because we're mixing two different concepts: missing values and masks. There should be support for missing values in numpy.core, I think we all agree on that. * What's been suggested of adding new dtypes

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-24 Thread Pierre GM
On Jun 24, 2011, at 4:44 PM, Robert Kern wrote: On Fri, Jun 24, 2011 at 09:35, Robert Kern robert.k...@gmail.com wrote: On Fri, Jun 24, 2011 at 09:24, Keith Goodman kwgood...@gmail.com wrote: On Fri, Jun 24, 2011 at 7:06 AM, Robert Kern robert.k...@gmail.com wrote: The alternative proposal

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Pierre GM
On Jun 23, 2011, at 11:55 PM, Mark Wiebe wrote: On Thu, Jun 23, 2011 at 4:46 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Jun 23, 2011 at 2:53 PM, Mark Wiebe mwwi...@gmail.com wrote: Enthought has asked me to look into the missing data problem and how NumPy could treat it

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Pierre GM
On Jun 24, 2011, at 12:43 AM, Mark Wiebe wrote: On Thu, Jun 23, 2011 at 5:24 PM, Pierre GM pgmdevl...@gmail.com wrote: ... Mmh, after timeseries, now masked arrays... Mark, I start to see a pattern here ;) I think it speaks to what's on Enthought's mind, in any case. :) Eh

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Pierre GM
Sorry y'all, I'm just commenting bits by bits: One key problem is a lack of orthogonality with other features, for instance creating a masked array with physical quantities can't be done because both are separate subclasses of ndarray. The only reasonable way to deal with this is to move the

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Pierre GM
On Jun 24, 2011, at 2:21 AM, Charles R Harris wrote: On Thu, Jun 23, 2011 at 6:00 PM, Nathaniel Smith n...@pobox.com wrote: On Thu, Jun 23, 2011 at 2:44 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, Jun 23, 2011 at 15:53, Mark Wiebe mwwi...@gmail.com wrote: Enthought has asked

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Pierre GM
On Jun 24, 2011, at 2:42 AM, Mark Wiebe wrote: On Thu, Jun 23, 2011 at 7:28 PM, Pierre GM pgmdevl...@gmail.com wrote: Sorry y'all, I'm just commenting bits by bits: One key problem is a lack of orthogonality with other features, for instance creating a masked array with physical

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Pierre GM
On Jun 24, 2011, at 2:56 AM, Benjamin Root wrote: As a heavy masked_array user, I regret not being able to participate more in this discussion as I am madly cranking out matplotlib code. I would like to say that I have always seen masked arrays as being the next step up from using

Re: [Numpy-discussion] fixing up datetime

2011-06-10 Thread Pierre GM
On Jun 11, 2011, at 1:03 AM, Mark Wiebe wrote: I don't think you would want to extend the datetime with more metadata, but rather use it as a tool to create the timeseries with. You could create a lightweight wrapper around datetime arrays which exposed a timeseries-oriented interface

Re: [Numpy-discussion] fixing up datetime

2011-06-09 Thread Pierre GM
The fact that it's a NumPy dtype probably is the biggest limiting factor preventing parameters like 'start' and 'end' during conversion. Having a datetime represent an instant in time neatly removes any ambiguity, so converting between days and seconds as a unit is analogous to converting

Re: [Numpy-discussion] Default unit for datetime/timedelta

2011-06-08 Thread Pierre GM
On Jun 8, 2011, at 11:05 PM, Mark Wiebe wrote: The NEP and current implementation of the datetime specifies microseconds as the default unit when constructing and converting to datetimes and timedeltas. AFAIU, the default is [us] when otherwise unspecified. Here are some current behaviors

Re: [Numpy-discussion] Default unit for datetime/timedelta

2011-06-08 Thread Pierre GM
On Jun 9, 2011, at 1:10 AM, Mark Wiebe wrote: np.timedelta64(10, 's') + 10 numpy.timedelta64(20,'s') Here, the unit is defined: 's' For the first operand, the inconsistency is with the second. Here's the reasoning I didn't spell out: We're adding a timedelta + int, so lets

Re: [Numpy-discussion] fixing up datetime

2011-06-07 Thread Pierre GM
, Christopher Barker wrote: Pierre GM wrote: Using the ISO as reference, you have a good definition of months. Yes, but only one. there are others. For instance, the climate modelers like to use a calendar that has 360 days a year: 12 30 day months. That way they get something with the same

Re: [Numpy-discussion] fixing up datetime

2011-06-07 Thread Pierre GM
On Jun 8, 2011, at 1:16 AM, Mark Wiebe wrote: Hi Dave, Thanks for all the feedback on the datetime, it's very useful to help understand the timeseries ideas, in particular with the many examples you're sprinkling in. One overall impression I have about timeseries in general is the use

Re: [Numpy-discussion] fixing up datetime

2011-06-07 Thread Pierre GM
It supports .astype(), with a truncation policy. This is motivated partially because that's how Pythons integer division works, and partially because if you consider a full datetime '2011-03-14T13:22:16', it's natural to think of the year as '2011', the date as '2011-03-14', etc, which is

Re: [Numpy-discussion] fixing up datetime

2011-06-06 Thread Pierre GM
On Jun 6, 2011, at 8:33 PM, Christopher Barker wrote: Mark Wiebe wrote: I'm wondering if removing the business-day unit from datetime64, and adding a business-day API would be a good approach to support all the things that are needed? That sounds like a good idea to me -- and perhaps it

Re: [Numpy-discussion] fixing up datetime

2011-06-02 Thread Pierre GM
On Jun 1, 2011, at 11:16 PM, Mark Wiebe wrote: On Wed, Jun 1, 2011 at 3:52 PM, Charles R Harris charlesr.har...@gmail.com wrote: snip Just a quick comment, as this really needs more thought, but time is a bag of worms. Certainly a bag of worms, I agree. Oh yes... Keep in mind that

Re: [Numpy-discussion] fixing up datetime

2011-06-02 Thread Pierre GM
On Jun 2, 2011, at 6:57 PM, Christopher Barker wrote: Mark Wiebe wrote: I'm following what I understand the NEP to mean for combining dates and deltas of different units. This means for timedeltas, the metadata becomes more precise, in particular it becomes the GCD of the input metadata,

[Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
All, Could somebody tell me the advantage of changing the milestone of tickets that have been closed for more than 10 months ? I'm genuinely curious. P. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: It's so we can see what bugs are actually fixed for 2.0 (as opposed to a prior release), and a bug that's marked 'closed' but Unscheduled simply doesn't make sense to me. I'm sorry, I'm still failing to see the logic. * You're not sure

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 4:53 PM, Derek Homeier wrote: 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

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
On May 31, 2011, at 6:06 PM, Bruce Southey wrote: On 05/31/2011 10:33 AM, Mark Wiebe wrote: On Tue, May 31, 2011 at 10:09 AM, Pierre GM pgmdevl...@gmail.com wrote: On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: It's so we can see what bugs are actually fixed for 2.0 (as opposed

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
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 additional dimensions, if required)

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 6:37 PM, Derek Homeier wrote: 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

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
On May 31, 2011, at 9:06 PM, Ralf Gommers wrote: It is helpful to have this cleaned up, thanks Mark for taking the time for this. Mind you, I do agree with y'all for the cleaning up. I just had a shock when I received the batch of what I thought were brand new bugs that turned up to have

Re: [Numpy-discussion] Data standardizing

2011-04-14 Thread Pierre GM
On Apr 12, 2011, at 8:48 PM, Climate Research wrote: Hi I am purely new to python and numpy.. I am using python for doing statistical calculations to Climate data.. Check the scikits.timeseries and scikits.hydroclimpy as well, they have routines for that very purpose.

Re: [Numpy-discussion] Remove deprecated skiprows

2011-04-05 Thread Pierre GM
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 skiprows be removed? if skiprows: warnings.warn(\

Re: [Numpy-discussion] Remove deprecated skiprows

2011-04-05 Thread Pierre GM
On Apr 6, 2011, at 12:16 AM, Alan G Isaac wrote: On 4/5/2011 6:11 PM, Skipper Seabold wrote: To my mind, skip_headers is a bool Well, that's understandable... So, yet another change of name to skip_header_lines, skip_footer_lines, with the deprecation that goes with it ? More seriously, as

Re: [Numpy-discussion] {zeros, empty, ...}_like functions behavior with subclasses

2011-02-28 Thread Pierre GM
On Mar 1, 2011, at 1:05 AM, Bruce Southey wrote: On Mon, Feb 28, 2011 at 4:52 PM, Wes McKinney wesmck...@gmail.com wrote: I'm having some trouble with the zeros_like function via np.fix: def zeros_like(a): if isinstance(a, ndarray): res = ndarray.__new__(type(a), a.shape,

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

2011-01-25 Thread Pierre GM
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 StringIO import StringIO import numpy as np data = 1, 2, 3\n4, ,5

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

2011-01-25 Thread Pierre GM
On Jan 25, 2011, at 9:06 PM, Bruce Southey wrote: Your filling_values is zero so there is this line (1295?) in the code: user_filling_values = filling_values or [] Which of cause presumes your filling_values is not something like 0 or [0]. That's the bug. I forgot that filling_values could

Re: [Numpy-discussion] mapping a function to a masked array

2011-01-12 Thread Pierre GM
On Jan 12, 2011, at 12:45 PM, Ben Elliston wrote: I have a masked array of values that I would like to transform through a user-defined function. Naturally, I want to ignore any values that are masked in the initial array. The user-defined function examines other points around the value

Re: [Numpy-discussion] subdivide array

2010-11-30 Thread Pierre GM
On Nov 30, 2010, at 5:40 PM, John wrote: Hello, I have an array of data for a global grid at 1 degree resolution. It's filled with 1s and 0s, and it is just a land sea mask (not only, but as an example). I want to be able to regrid the data to higher or lower resolutions (i.e. 0.5 or 2

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

2010-11-30 Thread Pierre GM
On Nov 30, 2010, at 11:22 PM, Keith Goodman wrote: On Tue, Nov 30, 2010 at 1:41 PM, Skipper Seabold jsseab...@gmail.com wrote: 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

Re: [Numpy-discussion] Test failures on 2.6

2010-11-18 Thread Pierre GM
On Oct 5, 2008, at 10:53 PM, T J wrote: Hi, I'm getting a couple of test failures with Python 2.6, Numpy 1.2.0, Nose 0.10.4: Wow, 1.2.0 ? That's fairly ancient. I gather the bugs in numpy.ma have been corrected since (they don't really look familiar, though). And with a more recent

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-15 Thread Pierre GM
On Nov 15, 2010, at 1:07 PM, Lluís wrote: Pierre GM writes: On Nov 14, 2010, at 9:30 PM, Lluís wrote: This will work as long as 'first_values' is assured to always contain valid data and as long as its indexes are equivalent to those in converters (which I simply haven't checked). I

Re: [Numpy-discussion] dtypes error in recfunctions

2010-11-15 Thread Pierre GM
On Nov 15, 2010, at 11:43 PM, Benjamin Root wrote: Hello, I was using append_fields() in numpy.lib.recfunctions when I discovered a slight logic mistake in handling the dtypes argument. The code first checks to see if dtypes is None. If so, it then guesses the dtype info from the

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-14 Thread Pierre GM
On Nov 14, 2010, at 9:30 PM, Lluís wrote: This will work as long as 'first_values' is assured to always contain valid data and as long as its indexes are equivalent to those in converters (which I simply haven't checked). I beat you to it, actually ;) Check the git push I committed earlier

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-11 Thread Pierre GM
All, Sorry for the delayed answer. I had a bit of time and examined the issue in more details: As you've seen, the output of your converter is not detected as a float, but as an object. That's an unfortunate side effect of using a lambda function such as yours: what if your input string has

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-11 Thread Pierre GM
On Nov 11, 2010, at 8:31 PM, Lluís wrote: Pierre GM writes: In practice, that's exactly what happens below the hood when genfromtxt tries to guess the output type of the converter. It tries a single value ('1'), fails, and decides that the result must be an object... Probably not the best

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-07 Thread Pierre GM
On Nov 6, 2010, at 2:22 PM, Damien Moore wrote: Hi List, I'm trying to import csv data as a numpy array using genfromtxt. The csv file contains mixed data, some floating point, others string codes and dates that I want to convert to floating point. The strange thing is that when I use

Re: [Numpy-discussion] np.ma.masked_invalid and precision

2010-10-31 Thread Pierre GM
On Oct 31, 2010, at 9:28 PM, bevan jenkins wrote: Hello, I am not sure if the following is a bug or not. I recently tried to set the print precision in numpy but it didn't seem to make a difference. It seems that the use of np.ma.masked_invalid results in arrays printing precision of 12

Re: [Numpy-discussion] genfromtxt behaviour

2010-10-29 Thread Pierre GM
On Oct 29, 2010, at 2:35 PM, Matt Studley wrote: Hi all first, please forgive me for my ignorance - I am taking my first stumbling steps with numpy and scipy. No problem, it;s educational I am having some difficulty with the behaviour of genfromtxt. s = SIO.StringIO(1, 2, 3 4, 5, 6

Re: [Numpy-discussion] genfromtxt behaviour

2010-10-29 Thread Pierre GM
On Oct 29, 2010, at 2:59 PM, Matt Studley wrote: snip How can I do my nice 2d slicing on the latter? array([('a', 2, 3), ('b', 5, 6), ('c', 8, 9)], dtype=[('f0', '|S1'), ('f1', 'i4'), ('f2', 'i4')]) Select a column by its name: yourarray['f0'] Super! So I would need to get

Re: [Numpy-discussion] ndarray __getattr__ to perform __getitem__

2010-10-29 Thread Pierre GM
On Oct 29, 2010, at 3:58 PM, Ian Stokes-Rees wrote: Note that there are various extant projects that I think attempt to provide similar functionality to what you're wanting (unless I badly misread your original email, in which case apologies):

Re: [Numpy-discussion] Awaiting confirmation before closing tickets

2010-10-14 Thread Pierre GM
On Oct 15, 2010, at 12:47 AM, Friedrich Romstedt wrote: 2010/10/11 Pierre GM pgmdevl...@gmail.com: All, The following tickets could be closed if somebody confirmed everything works OK: * 1586: fixed in r8714 * 1593: fixed in r8715 * 1591: fixed in r8713 * 1493: fixed a while ago (sorry

Re: [Numpy-discussion] Development workflow

2010-10-12 Thread Pierre GM
All, All my sincere apologies for the mess I caused... The changes I wanted to commit were quite minimal (just a few lines in a test), but I obviously included some stuffs I didn't want too... Anyhow, I just reverted the commit, as David told me to, and see what I need to do from there without

Re: [Numpy-discussion] Development workflow

2010-10-12 Thread Pierre GM
On Oct 12, 2010, at 11:32 AM, Matthew Brett wrote: I think the only possible lesson that might be drawn is that it probably would have helped you as it has certainly helped me, to have someone scan the set of changes and comment - as part of the workflow. That, and a nice set of

Re: [Numpy-discussion] Development workflow

2010-10-12 Thread Pierre GM
On Oct 12, 2010, at 5:10 PM, David Cournapeau wrote: On Tue, Oct 12, 2010 at 6:06 PM, Pierre GM pgmdevl...@gmail.com wrote: All, All my sincere apologies for the mess I caused... The changes I wanted to commit were quite minimal (just a few lines in a test), but I obviously included some

Re: [Numpy-discussion] Development workflow

2010-10-12 Thread Pierre GM
On Oct 12, 2010, at 5:28 PM, David Cournapeau wrote: I gonna try again in a couple of hours. Looks like I need to specifically exclude the files created by a `python setup.py develop`. Not sure I understand the link between git and python setup.py develop. What git command did you use to

Re: [Numpy-discussion] Development workflow

2010-10-12 Thread Pierre GM
On Oct 12, 2010, at 5:38 PM, David Cournapeau wrote: On Wed, Oct 13, 2010 at 12:31 AM, Pierre GM pgmdevl...@gmail.com wrote: git push The files created by setup.py develop are marked as not added but pollute some of the reports (diff, eg). I am still not following - generated files

[Numpy-discussion] Commit rights on github

2010-10-11 Thread Pierre GM
All, Would any of you mind giving me commit rights on github? My handle is pierregm. Thanks a million in advance. P. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Awaiting confirmation before closing tickets

2010-10-11 Thread Pierre GM
All, The following tickets could be closed if somebody confirmed everything works OK: * 1586: fixed in r8714 * 1593: fixed in r8715 * 1591: fixed in r8713 * 1493: fixed a while ago (sorry, I completely forgot to comment on it). Let me know how it goes and I'll close them. Or not. Thanks in advance

  1   2   3   4   5   6   7   >