You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArraySetLink.py 293 B

4 years ago
1234567891011
  1. from __future__ import absolute_import
  2. import ctypes
  3. from .._base import _LIB
  4. from .. import ndarray as _nd
  5. def array_set(arr, value, stream=None):
  6. assert isinstance(arr, _nd.NDArray)
  7. _LIB.DLGpuArraySet(arr.handle, ctypes.c_float(
  8. value), stream.handle if stream else None)