Commit 2e71fb6b authored by Cory Quammen's avatar Cory Quammen

Explain pitfall when using built-in Python functions

parent 4ba74b8d
......@@ -1192,6 +1192,15 @@ functions described here apply individually to all point or cell values and
produce an array the same dimensions as the input. However, some of them, such
as \py{min()} and \py{max()}, produce single values.
In the \ui{Programmable Filter}, all the functions in
\py{vtk.numpy_interface.algorithms} are imported prior to executing the script.
As a result, some built-in functions, such as \py{min} and \py{max}, are
clobbered by that import. To use the built-in functions, import the \py{import
__builtin__} module and access those functions with, e.g., \py{__builtin__.min}
and \py{__builtin__.max}
\subsubsection{Accessing data}
There are several ways of accessing input arrays within expressions. The
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment