Hi again,
I noticed that clip() needs two parameters, but wouldn't it be nice and
straightforward to just pass min= or max= as keyword arg?
In [2]: a = arange(10)
In [3]: a.clip(min = 2, max = 5)
Out[3]: array([2, 2, 2, 3, 4, 5, 5, 5, 5, 5])
In [4]: a.clip(min = 2)
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent
call last)
/home/meine/<ipython console>
TypeError: function takes at least 2 arguments (1 given)
(I could simulate that by passing max = maximum_value_of(a.dtype), if that
existed, see my other mail.)
Ciao, / /
/--/
/ / ANS
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion