On Wed, Nov 18, 2009 at 10:17 AM, James Bergstra
wrote:
> On Tue, Nov 17, 2009 at 9:53 PM, Robert Kern
> wrote:
> > On Tue, Nov 17, 2009 at 20:48, James Bergstra
> wrote:
> >> Is it by design that "numpy.sqrt(None)" raises an "AttributeError:
> sqrt"?
> >
> > Yes. numpy.sqrt() is a ufunc. Ufunc
On Tue, Nov 17, 2009 at 9:53 PM, Robert Kern wrote:
> On Tue, Nov 17, 2009 at 20:48, James Bergstra
> wrote:
>> Is it by design that "numpy.sqrt(None)" raises an "AttributeError: sqrt"?
>
> Yes. numpy.sqrt() is a ufunc. Ufuncs take their arguments and try to
> convert them to numpy arrays; the
On Tue, Nov 17, 2009 at 20:48, James Bergstra wrote:
> Is it by design that "numpy.sqrt(None)" raises an "AttributeError: sqrt"?
Yes. numpy.sqrt() is a ufunc. Ufuncs take their arguments and try to
convert them to numpy arrays; the manual equivalent is
numpy.asarray(None). In this case, you get
Is it by design that "numpy.sqrt(None)" raises an "AttributeError: sqrt"?
This was confusing because there was an attribute lookup of 'sqrt' in
numpy right there in the expression I typed, but that was not the
attribute that python was complaining about. I presume that numpy.sqrt
didn't know wha