> Don't forget that np.where is not smart
And there's really no way it could be. np.where, like all Python
functions, must evaluate all of the arguments first, then call the function.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://m
Thanks. I must have had runtime warnings turned off in my previous
versions of python.
On Sat, Nov 16, 2013 at 8:42 AM, alex wrote:
> On Sat, Nov 16, 2013 at 8:28 AM, David Pine wrote:
> > The program at the bottom of this message returns the following runtime
> warning:
> >
> > python test.p
Hi,
Don't forget that np.where is not smart. First np.sin(x)/x is computed
for the array, which is why you see the warning, and then np.where
selects the proper final results.
Cheers,
Matthieu
2013/11/16 David Pine :
> The program at the bottom of this message returns the following runtime
> w
On Sat, Nov 16, 2013 at 8:28 AM, David Pine wrote:
> The program at the bottom of this message returns the following runtime
> warning:
>
> python test.py
> test.py:5: RuntimeWarning: invalid value encountered in divide
> return np.where(x==0., 1., np.sin(x)/x)
>
> The function works correctly r
On Sat, Nov 16, 2013 at 8:28 AM, David Pine wrote:
> The program at the bottom of this message returns the following runtime
> warning:
>
> python test.py
> test.py:5: RuntimeWarning: invalid value encountered in divide
> return np.where(x==0., 1., np.sin(x)/x)
>
> The function works correctly r
The program at the bottom of this message returns the following runtime warning:
python test.py
test.py:5: RuntimeWarning: invalid value encountered in divide
return np.where(x==0., 1., np.sin(x)/x)
The function works correctly returning
x = np.array([ 0., 1., 2., 3., 4., 5., 6.,
On Fri, Nov 15, 2013 at 8:47 PM, Julian Taylor <
jtaylor.deb...@googlemail.com> wrote:
> >
> > Will do, but the errors I am seeing only appear in the
> > simc.inc.src-based implementation of BOOL_logical_or (they disappear if
> > I disable the simd intrinsics manually in the numpy headers).
> >
>