[Numpy-discussion] Re place array values
Derek Ashley Thomas
Wed Mar 14 18:57:48 CDT 2012
I'm completely new to this list (and fairly new to numpy in general), but I
was wondering if you tried multiplying the bool array and the original
if rank(x) <= 1
This will give you a completely numerical array of the same structure, but
all numbers less than 1 will be zero fo easy handling. Is this what you're
trying to accomplish?
On Thu, Mar 15, 2012 at 08:35, jonasr <email@example.com> wrote:
> my problem is that i want to remove some small numbers of an 2d array,
> for example if i want to sort out all numbers smaller then 1 of an array i
> In : c
> array([[False, True, True],
> [ True, True, True],
> [ True, True, True]], dtype=bool)
> In : x[c]
> Out: array([1, 2, 3, 4, 5, 6, 7, 8])
> the problem ist that i now have a 1d array, is there any possibility to
> keep the 2d structure ?
> greets jonas
> View this message in context:
> Sent from the Numpy-discussion mailing list archive at Nabble.com.
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion