[Numpy-discussion] general newbie question about applying an arbitrary function to all elements in a numpy array

Robert Kern robert.kern at gmail.com
Tue May 3 22:33:41 EDT 2011

On Tue, May 3, 2011 at 19:34, Michael Katz <michaeladamkatz at yahoo.com> wrote:
> Robert, thanks for these quick replies.
> So, it sounds like the main thing is for me to get better at thinking
> "declaratively" in terms of these array operations, instead of the
> "imperative" way I normally think about processing arrays in C++.
> I did look at Numexpr, and that's in the direction I had in mind. It's not
> quite what I was thinking, in terms of being able to use arbitrary if/else
> statements and function calls, but it certainly seems to let you at least
> express your computations in a natural way without having to worry so much
> about the number of temp arrays being created.

Theano does something along those lines.


Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list