numpy.place()
numpy.place
-
numpy.place(arr, mask, vals)
[source] -
Change elements of an array based on conditional and input values.
Similar to
np.copyto(arr, vals, where=mask)
, the difference is thatplace
uses the first N elements ofvals
, where N is the number of True values inmask
, whilecopyto
uses the elements wheremask
is True.Note that 登录查看完整内容