thanks alot!!
--
http://mail.python.org/mailman/listinfo/python-list
hello everyone!
sorry to disturb you with this, but i really cant find anything
suitable about the topic in the numarray documentation.
how can i find in an efficient way the index of the last occurrence of
a given element in a numarray array?
many thanks in advance!
--
http://mail.python.org/mai
thanks guys!
import timeit
first_way = "the_array[the_array == 0] = 5.0"
second_way = "another_array = numarray.choose(the_array == 0,
(the_array, 5.0))"
some_third_way = """\
indx = numarray.where(the_array == 0)[0]
another_array = numarray.put(the_array, indx, len(indx) * [5.0,])
""
hello everyone
would anyone please tell me what is the best (fastest) way of replacing
values in numarray arrays?
lets say i have an array that may contain 0s, and i just want to get
rid of those 0s by replacing them with another number. what would be
the most efficient way to do that?
many than