You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / lib / _nanfunctions_impl / _copyto

function

numpy.lib._nanfunctions_impl:_copyto

source: /numpy/lib/_nanfunctions_impl.py :115

Signature

def   _copyto ( a val mask )

Summary

Replace values in a with NaN where mask is True. This differs from copyto in that it will deal with the case where a is a numpy scalar.

Parameters

a : ndarray or numpy scalar

Array or numpy scalar some of whose values are to be replaced by val.

val : numpy scalar

Value used a replacement.

mask : ndarray, scalar

Boolean array. Where True the corresponding element of a is replaced by val. Broadcasts.

Returns

res : ndarray, scalar

Array with elements replaced or scalar val.

Aliases

  • numpy.lib._nanfunctions_impl._copyto