jah | 1 Oct 02:56
Picon

Re: Convert data into rectangular grid



On Wed, Sep 30, 2009 at 8:57 AM, denis bzowy <denis-bz-py <at> t-online.de> wrote:
jah <jah.mailinglist <at> gmail.com> writes:

>
> Hi,Suppose I have a set of x,y,c data ... matplotlib.pyplot.contour() ).
>

JAH, is griddata() working and fast enough for you ?
How many points are you contouring ?



Thanks all.  Robert, griddata is exactly what I was looking for.  David, I think that should work too.  And Denis, griddata is sufficiently fast that I am not complaining---contouring about 1e6 or 1e7 points typically.


_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Charles R Harris | 1 Oct 04:45
Picon

repr and object arrays

Hi All,

It seems that repr applied do an object array does not provide the info needed to recreate it:

In [22]: y = array([Decimal(1)]*2)

In [23]: repr(y)
Out[23]: 'array([1, 1], dtype=object)'

And of course, there is going to be a problem with arrays of more than one dimension anyway. But I wonder if this should be fixed?

Chuck

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Robert Kern | 1 Oct 04:52
Picon
Gravatar

Re: repr and object arrays

On Wed, Sep 30, 2009 at 21:45, Charles R Harris
<charlesr.harris <at> gmail.com> wrote:
> Hi All,
>
> It seems that repr applied do an object array does not provide the info
> needed to recreate it:
>
> In [22]: y = array([Decimal(1)]*2)
>
> In [23]: repr(y)
> Out[23]: 'array([1, 1], dtype=object)'
>
> And of course, there is going to be a problem with arrays of more than one
> dimension anyway. But I wonder if this should be fixed?

Using repr() instead of str() for the items would probably be wise.

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
Charles R Harris | 1 Oct 08:16
Picon

More guestions on Chebyshev class.

The Chebyshev class is now working pretty well, but I would like to settle some things up front.

1) Order in which coefficients are stored/passed/accessed.

The current poly1d class ctor is called with the coefficients in high to low order, yet the __getitem__ and __setitem__ methods access them in reverse order. This seems confusing and I think both should go in the same order and my preference would be from low to high. The low to high order also works a bit better for implementation.

2) poly1d allows the size of the coefficient array to be dynamically extended. I have mixed feeling about that and would prefer not, but there are arguments for that: students might find it easier to fool with.

3) The poly1d class prunes leading (high power) zeros. Because the Cheb class has a fit static method that returns a Cheb object, and because when fitting with Chebyshev polynomials the user often wants to see *all* of the coefficients, even if some of the leading ones are zero, the Cheb class does not automatically prune the zeros, instead there are methods for that.

4) All the attributes of the Cheb class are read/write. The poly1d class attempts to hide some, but the method used breaks the copy module. Python really doesn't have private attributes, so I left all the attributes exposed with the usual Python proviso: if you don't know what it does, don't fool with it.

5) Is Cheb the proper name for the class?

Thoughts?

Chuck

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Charles R Harris | 1 Oct 08:23
Picon

Re: repr and object arrays



On Wed, Sep 30, 2009 at 8:52 PM, Robert Kern <robert.kern <at> gmail.com> wrote:
On Wed, Sep 30, 2009 at 21:45, Charles R Harris
<charlesr.harris <at> gmail.com> wrote:
> Hi All,
>
> It seems that repr applied do an object array does not provide the info
> needed to recreate it:
>
> In [22]: y = array([Decimal(1)]*2)
>
> In [23]: repr(y)
> Out[23]: 'array([1, 1], dtype=object)'
>
> And of course, there is going to be a problem with arrays of more than one
> dimension anyway. But I wonder if this should be fixed?

Using repr() instead of str() for the items would probably be wise.


OK, I'll open a ticket for it.

Chuck

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Pauli Virtanen | 1 Oct 08:55
Picon
Picon
Favicon

Re: ufunc and errors

Wed, 30 Sep 2009 10:33:46 -0500, Robert Kern wrote:
[clip]
>> Also, will the arguments always be named x1, x2, x3, ..., or can I
>> somehow give them custom names?
> 
> The only place where names appear is in the docstring. Write whatever
> text you like.

The first line of the docstring is generated by Numpy and cannot be 
modified.

--

-- 
Pauli Virtanen
Nadav Horesh | 1 Oct 12:46

Weird behaviour of scipy.signal.sepfir2d


This function function often result in incorrect output when the cpu is very loaded. I do not know how to
trace the bug since every "single shot" use, or step by step trace gives the correct answer, also when
running scripts under "ipython -pdb" solves the problem.

System:

>>> numpy.__version__
'1.4.0.dev7400'

>>> scipy.__version__
'0.8.0.dev5922'

Python 2.6.2 (64 bits)

numpy/scipy are built with atlas support.

OS: Gentoo linux (I use two independent (not a clone of each other) machines).

Sorry for posting it on the numpy list, but anyway this is not the first cross-lists post.

   Nadav
Ralf Gommers | 1 Oct 18:19
Gravatar

Re: merging docs from wiki



On Sun, Sep 20, 2009 at 8:59 PM, Ralf Gommers <ralf.gommers <at> googlemail.com> wrote:


On Sun, Sep 20, 2009 at 3:49 PM, Ralf Gommers <ralf.gommers <at> googlemail.com> wrote:
Hi,

I'm done reviewing all the improved docstrings for NumPy, they can be merged now from the doc editor Patch page. Maybe I'll get around to doing the SciPy ones as well this week, but I can't promise that.

Actually, scipy was a lot less work. Please merge that too.


Sorry to ask again, but it would really be very useful to get those docstrings merged for both scipy and numpy.

The scipy docs merge cleanly, anyone with commit access can do it, like this:
1. Go to http://docs.scipy.org/scipy/patch/ and log in.
2. click on "Select OK to apply"
3. click on "Generate patch"
4. select all the text in the browser and save as a patch.
5. apply patch, commit

For numpy in principle the same procedure, except there are some objects that need the add_newdocs treatment. There are two types of errors, my question is (mainly to Pauli) if they both need the same treatment or a different one. Errors:
1. source location not known, like:
ERROR: numpy.broadcast.next: source location for docstring is not known
2. source location known but failed to find a place to add docstrings, like:
ERROR: Source location for numpy.lib.function_base.iterable known, but failed to find a place for the docstring

Cheers,
Ralf

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Michael Droettboom | 1 Oct 18:26

Re: [SciPy-dev] Deprecate chararray [was Plea for help]

Thanks.  There's a bit of a snag getting my SVN permissions, and the doc 
editor permissions I assume are pending.  Once those things are in 
place, I can move forward on this and hopefully it will be clear what 
needs to be done.

Mike

David Goldsmith wrote:
> On Wed, Sep 30, 2009 at 2:09 PM, Ralf Gommers 
> <ralf.gommers <at> googlemail.com <mailto:ralf.gommers <at> googlemail.com>> wrote:
>
>
>     On Wed, Sep 30, 2009 at 4:37 PM, David Goldsmith
>     <d.l.goldsmith <at> gmail.com <mailto:d.l.goldsmith <at> gmail.com>> wrote:
>
>         So, Ralf (or anyone), how, if at all, should we modify the
>         status of the existing chararray objects/methods in the wiki?
>
>
>     Nothing has to be done until *after* Mike has committed his
>     changes to svn. Please see my previous email for what has to
>     happen at that point. Since Mike wrote the new docstrings it would
>     be best if he updated the status of the wiki pages then.
>
>
> OK; Mike: hopefully it will be clear what you have to do to update the 
> status (it's pretty trivial) but of course don't hesitate to email 
> (you can do so off-list if you prefer) w/ any questions; 
> unfortunately, AFAIK, there's no way to update the status of many 
> docstrings all at once - you'll have to do them each individually (if 
> you like, let me know when you've committed them and I can help - it 
> sounds like there will be a lot); the main "silly" thing to remember 
> is that the option to change the "Review status" only appears if 
> you're logged in. :-)
>  
>
>           Assuming you have no problem sharing them with me, Michael,
>         I could add those docstrings you created for the existing methods,
>
>
>     They will show up in the wiki when they get committed to svn
>     (presumably within a few days), so this is needless effort for the
>     most part. If there are different changes in the wiki and svn,
>     that will show up in the "merge" page.
>
>     The ony thing that requires manual effort is if there are changes
>     in the wiki and the object got moved in svn.
>
>
> And, as above, updating the status in the Wiki. :-)
>
> DG
>  
>
>     Cheers,
>     Ralf
>
>
>
>         DG
>
>
>         On Wed, Sep 30, 2009 at 7:20 AM, Michael Droettboom
>         <mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>> wrote:
>
>             Ralf Gommers wrote:
>             >
>             >
>             > On Wed, Sep 30, 2009 at 9:03 AM, Michael Droettboom
>             <mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>
>             > <mailto:mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>>> wrote:
>             >
>             >     In the source in my working copy.  Is that going to
>             cause problems?  I
>             >     wasn't sure if it was possible to document methods
>             that didn't yet
>             >     exist
>             >     in the code in the wiki.
>             >
>             > That is fine. New functions will automatically show up
>             in the wiki. It
>             > would be helpful though if you could mark them ready for
>             review in the
>             > wiki (if they are) after they show up. Could take up to
>             24 hours for
>             > svn changes to propagate.
>             Thanks.  Will do.
>             >
>             > Only if you moved functions around it would be useful if
>             you pinged
>             > Pauli after you committed them. This is a temporary
>             problem, right now
>             > the wiki creates a new page for a moved object, and the
>             old content
>             > (if any) has to be copied over to the new page.
>             All of the functions that were moved were previously
>             without docstrings
>             in SVN, though some had docstrings (that I just now
>             discovered) in the
>             wiki.  This may cause some hiccups, I suppose, so I'll be
>             sure to
>             announce when these things get committed to SVN so I know
>             how to help
>             straighten these things out.
>
>             Mike
>             >
>             > Cheers,
>             > Ralf
>             >
>             >
>             >     Mike
>             >
>             >     David Goldsmith wrote:
>             >     > On Tue, Sep 29, 2009 at 10:55 AM, Michael Droettboom
>             >     <mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>
>             <mailto:mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>>
>             >     > <mailto:mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>
>             <mailto:mdroe <at> stsci.edu <mailto:mdroe <at> stsci.edu>>>> wrote:
>             >     >
>             >     >     2) Improve documentation
>             >     >
>             >     >     Every method now has a docstring, and a new
>             page of routines
>             >     has been
>             >     >     added to the Sphinx tree.
>             >     >
>             >     >
>             >     > Um, where did you do this, 'cause it's not showing
>             up in the doc
>             >     wiki.
>             >     >
>             >     > DG
>             >     >
>             >    
>             ------------------------------------------------------------------------
>             >     >
>             >     > _______________________________________________
>             >     > NumPy-Discussion mailing list
>             >     > NumPy-Discussion <at> scipy.org
>             <mailto:NumPy-Discussion <at> scipy.org>
>             <mailto:NumPy-Discussion <at> scipy.org
>             <mailto:NumPy-Discussion <at> scipy.org>>
>             >     >
>             http://mail.scipy.org/mailman/listinfo/numpy-discussion
>             >     >
>             >
>             >     --
>             >     Michael Droettboom
>             >     Science Software Branch
>             >     Operations and Engineering Division
>             >     Space Telescope Science Institute
>             >     Operated by AURA for NASA
>             >
>             >     _______________________________________________
>             >     NumPy-Discussion mailing list
>             >     NumPy-Discussion <at> scipy.org
>             <mailto:NumPy-Discussion <at> scipy.org>
>             <mailto:NumPy-Discussion <at> scipy.org
>             <mailto:NumPy-Discussion <at> scipy.org>>
>             >     http://mail.scipy.org/mailman/listinfo/numpy-discussion
>             >
>             >
>             >
>             ------------------------------------------------------------------------
>             >
>             > _______________________________________________
>             > NumPy-Discussion mailing list
>             > NumPy-Discussion <at> scipy.org
>             <mailto:NumPy-Discussion <at> scipy.org>
>             > http://mail.scipy.org/mailman/listinfo/numpy-discussion
>             >
>
>             --
>             Michael Droettboom
>             Science Software Branch
>             Operations and Engineering Division
>             Space Telescope Science Institute
>             Operated by AURA for NASA
>
>             _______________________________________________
>             NumPy-Discussion mailing list
>             NumPy-Discussion <at> scipy.org <mailto:NumPy-Discussion <at> scipy.org>
>             http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
>         _______________________________________________
>         NumPy-Discussion mailing list
>         NumPy-Discussion <at> scipy.org <mailto:NumPy-Discussion <at> scipy.org>
>         http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
>     _______________________________________________
>     NumPy-Discussion mailing list
>     NumPy-Discussion <at> scipy.org <mailto:NumPy-Discussion <at> scipy.org>
>     http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>   

--

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
Jarrod Millman | 1 Oct 18:32
Picon
Favicon
Gravatar

Re: merging docs from wiki

On Thu, Oct 1, 2009 at 9:19 AM, Ralf Gommers
<ralf.gommers <at> googlemail.com> wrote:
> Sorry to ask again, but it would really be very useful to get those
> docstrings merged for both scipy and numpy.

I will do this now.
Jarrod

Gmane