[SciPy-user] truth testing new numpy arrays

Robert Kern robert.kern at gmail.com
Tue Jan 31 14:50:50 EST 2006


Paul Ray wrote:

> Assuming you use None for unset optional arguments, how do  you do  
> the test?

> if myvect is not None:
> 	<do something>
> ?

This is *the* canonical, Pythonic approach.

-- 
Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the SciPy-User mailing list