March 2003
Intermediate to advanced
656 pages
39h 30m
English
clip
clip(m,min,max)
Returns an array c with the same type code
and shape as a. Each element
ec of c is the
corresponding element ea of
a, where
min
<=
ea
<=
max.
Where
ea
<
min,
ec is min;
where
ea
>
max,
ec is max. For
example:
print Numeric.clip(Numeric.arange(10),2,7) # prints: [2 2 2 3 4 5 6 7 7 7]