On Sat, Apr 12, 2014 at 5:03 PM, Sebastian Berg
wrote:
> > As a simple example, suppose for array `a` I want
> > np.flatnonzero(a>0) and np.flatnonzero(a<=0).
> > Can I get them both in one go?
> >
>
> Might be missing something, but I don't think there is a way to do it in
> one go. The result is
On Sa, 2014-04-12 at 16:47 -0400, Alan G Isaac wrote:
> From a 1d array, I want two arrays of indexes:
> the first for elements that satisfy a criterion,
> and the second for elements that do not. Naturally
> there are many ways to do this. Is there a preferred way?
>
> As a simple example, sup
On Sat, Apr 12, 2014 at 4:47 PM, Alan G Isaac wrote:
> As a simple example, suppose for array `a` I want
> np.flatnonzero(a>0) and np.flatnonzero(a<=0).
> Can I get them both in one go?
>
I don't think you can do better than
x = a > 0
p, q = np.flatnonzero(x), np.flatnonzero(~x)
___
From a 1d array, I want two arrays of indexes:
the first for elements that satisfy a criterion,
and the second for elements that do not. Naturally
there are many ways to do this. Is there a preferred way?
As a simple example, suppose for array `a` I want
np.flatnonzero(a>0) and np.flatnonzero(a
BLIS seems like a nice project as well. I like the arbitrary striding; BLAS
lacking this has always annoyed me.
-Original Message-
From: "Sturla Molden"
Sent: 12-4-2014 13:12
To: "numpy-discussion@scipy.org"
Subject: Re: [Numpy-discussion] Wiki page for building numerical stuff onWin
On Sat, Apr 12, 2014 at 10:02 AM, Alan G Isaac wrote:
> Are there any considerations besides convenience in choosing
> between:
>
> a&b a*b logical_and(a,b)
> a|b a+b logical_or(a,b)
> ~aTrue-a logical_not(a)
>
Boolean "-" is being deprecated:
Agree that OpenBLAS is the most favorable route instead of starting from
scratch.
Btw, why is sparse BLAS not included as I've always been under the
impression that scipy sparse supports BLAS - no?
___
NumPy-Discussion mailing list
NumPy-Discussion
On Sat, Apr 12, 2014 at 8:02 AM, Alan G Isaac wrote:
> This is a very basic question.
> Suppose `a` and `b` are boolean arrays with the same shape.
> Are there any considerations besides convenience in choosing
> between:
>
> a&b a*b logical_and(a,b)
> a|b a+b
This is a very basic question.
Suppose `a` and `b` are boolean arrays with the same shape.
Are there any considerations besides convenience in choosing
between:
a&b a*b logical_and(a,b)
a|b a+b logical_or(a,b)
~aTrue-a logical_not(a)
I somewhat
Eelco Hoogendoorn wrote:
> I wonder: how hard would it be to create a more 21th-century oriented BLAS,
> relying more on code generation tools, and perhaps LLVM/JITting?
>
> Wouldn't we get ten times the portability with one-tenth the lines of code?
> Or is there too much dark magic going on in
I wonder: how hard would it be to create a more 21th-century oriented BLAS,
relying more on code generation tools, and perhaps LLVM/JITting?
Wouldn't we get ten times the portability with one-tenth the lines of code?
Or is there too much dark magic going on in BLAS for such an approach to
come clo
11 matches
Mail list logo