if value is None:
return numpy.asarray(dataset)
if isinstance(value, chainerx.ndarray):
value_view = chainerx.to_numpy(value, copy=False)
dataset.read_direct(value_view)
elif isinstance(value, numpy.ndarray):
dataset.read_direct(value)
elif isinstance(value, cuda.ndarray):
After Change
if value is None:
return numpy.asarray(dataset)
if isinstance(value, chainerx.ndarray):
value[...] = _chainerx._array_to_chainerx(
numpy.asarray(dataset), value.device)
elif isinstance(value, numpy.ndarray):
dataset.read_direct(value)