Paul Kienzle wrote:
> Let me rephrase: Can we have a function sqrt(x) which returns real if x is
> nonnegative, and complex if it is negative? Similarly for other math
> functions
> such as log which produce complex values for negative numbers?
standard python is
>>> import cmath
>>> cmath.sqrt
On Jul 20, 2007, at 5:53 PM, Christopher Barker wrote:
> However, I have seen a real shift on the numpy list over the last year
> (or two), toward using the namespace.
Yes, I do that to, primarily in scripts. However, for interactive
sessions, I usually import into the top namespace. I imagin
>> so I think it does make sense to bring the common names that show up in
>> math expressions into the main namespace.
>> This is probably best just done by each individual according to his/her
>> taste.
>
> That's what I'm trying to get away from. I want to be able to write
> the contains()
On Fri, Jul 20, 2007 at 02:53:42PM -0700, Christopher Barker wrote:
> Paul Kienzle wrote:
> > On Fri, Jul 20, 2007 at 12:34:44PM -0700, Christopher Barker wrote:
> >> Out of 491 names in the numpy namespace, I found 26 that would commonly
> >> be found in math expressions.
>
> > The C99 math/com
Robert Kern wrote:
> Rob Hetland wrote:
>> There is also quite a bit of advice on the internet and otherwise
>> that 'from numpy import *' is the way to import the library. For
>> example, this is the approach in Oliphant's 'Guide to Numpy.'
>
> You'll often see it in examples because it's th
On Jul 20, 2007, at 2:02 PM, Christopher Barker wrote:
> That's why: "Namespaces are one honking great idea". They really are.
> Trust me on this.
I get namespaces. They are really great. It's just that I use numpy
and mpl *so* much that the namespaces get in the way. Most of my
(smaller)
Rob Hetland wrote:
> There is also quite a bit of advice on the internet and otherwise
> that 'from numpy import *' is the way to import the library. For
> example, this is the approach in Oliphant's 'Guide to Numpy.'
You'll often see it in examples because it's the only way to make examples
Paul Kienzle wrote:
> Let me rephrase: Can we have a function sqrt(x) which returns real if x is
> nonnegative, and complex if it is negative? Similarly for other math
> functions
> such as log which produce complex values for negative numbers?
>
> I suppose the numpy list is the place to debat
On Fri, Jul 20, 2007 at 12:34:44PM -0700, Christopher Barker wrote:
> You're right that for math expressions, it is nice to have them in the
> namespace, so this is used a lot:
>
> from numpy import sqrt, sin, cos, exp
>
> Maybe it's a reasonable idea to write a Nmath.py, which would have an
>
Paul Kienzle wrote:
> This is improved somewhat as:
>
> import numpy as N
> res = N.sqrt(2*N.sin(N.pi*x**2) + N.cos(x**2) - N.exp(2*N.pi*1j))
>
> but the following is better:
>
> from mpl.math import *
> res = sqrt(2*sin(pi*x**2) + cos(x**2) - exp(2*pi*1j))
quite true. Interestingly, I
On Fri, Jul 20, 2007 at 09:03:21AM -1000, Eric Firing wrote:
> Good, thank you. This brings up the larger question of the major
> redesign that is underway, and how to make sure we don't lose the
> benefit of wonderful speedups like quadmesh. How hard would it be to
> translate it to use the s
On 7/20/07, Eric Firing <[EMAIL PROTECTED]> wrote:
> ngs up the larger question of the major
> redesign that is underway, and how to make sure we don't lose the
> benefit of wonderful speedups like quadmesh. How hard would it be to
> translate it to use the swig-wrapped version of agg rather than
On Fri, Jul 20, 2007 at 11:02:45AM -0700, Christopher Barker wrote:
> Rob Hetland wrote:
> > First, it has bothered me that from pylab import * and from numpy
> > import * both import 'load' statements. Yes, I realize that I can put
> > them in their own name space, but I only use python for mp
Paul Kienzle wrote:
[...]
>> Quadmesh has a bug in it that I would love to see squashed. Can you
>> look at it, or induce someone else to do so? I tried but couldn't
>> figure it out--it is something deep in the use of Agg. It is illustrated
>> by examples/quadmesh_demo.py. With masked data (
On Fri, Jul 20, 2007 at 06:57:26AM -1000, Eric Firing wrote:
> Paul Kienzle wrote:
> > On Fri, Jul 20, 2007 at 08:53:30AM -0400, Rob Hetland wrote:
> >> Second, much of what I do involves plotting model data (on a
> >> curvilinear grid). I generally like to use pcolor for these plots.
> >> I
Rob Hetland wrote:
> On Jul 20, 2007, at 9:07 AM, Paul Kienzle wrote:
>
>> On Fri, Jul 20, 2007 at 08:53:30AM -0400, Rob Hetland wrote:
>>> Second, much of what I do involves plotting model data (on a
>>> curvilinear grid). I generally like to use pcolor for these plots.
>>> I *always* want shadi
Rob Hetland wrote:
> First, it has bothered me that from pylab import * and from numpy
> import * both import 'load' statements. Yes, I realize that I can put
> them in their own name space, but I only use python for mpl and numpy
That's why: "Namespaces are one honking great idea". They re
Paul Kienzle wrote:
> On Fri, Jul 20, 2007 at 08:53:30AM -0400, Rob Hetland wrote:
>> Second, much of what I do involves plotting model data (on a
>> curvilinear grid). I generally like to use pcolor for these plots.
>> I *always* want shading='flat' Some of my grids are large, and I
>> on
On Jul 20, 2007, at 9:07 AM, Paul Kienzle wrote:
> On Fri, Jul 20, 2007 at 08:53:30AM -0400, Rob Hetland wrote:
>> Second, much of what I do involves plotting model data (on a
>> curvilinear grid). I generally like to use pcolor for these plots.
>> I *always* want shading='flat' Some of my grid
On Fri, Jul 20, 2007 at 08:53:30AM -0400, Rob Hetland wrote:
> Second, much of what I do involves plotting model data (on a
> curvilinear grid). I generally like to use pcolor for these plots.
> I *always* want shading='flat' Some of my grids are large, and I
> only see lines if I don't.
I just noticed that the example poly_editor.py is broken. It appears
to be the Artist.update_from(self.line, poly) that is called when the
polygon is changed. The problem is that no change is saved after a
subsequent modification.
Also, clippath_test.py (that also uses Polygons) appears t
21 matches
Mail list logo