(self, arg, typecode, shape=None, readonly=False)
| 373 | TypeMap.pop("G", None) |
| 374 | |
| 375 | def __init__(self, arg, typecode, shape=None, readonly=False): |
| 376 | if isinstance(arg, (int, float, complex)): |
| 377 | if shape is None: |
| 378 | shape = () |
| 379 | else: |
| 380 | if shape is None: |
| 381 | shape = len(arg) |
| 382 | self.array = cupy.zeros(shape, typecode) |
| 383 | if isinstance(arg, (int, float, complex)): |
| 384 | self.array.fill(arg) |
| 385 | else: |
| 386 | self.array[:] = cupy.asarray(arg, typecode) |
| 387 | del readonly # self.array.flags.readonly = readonly |
| 388 | |
| 389 | @property |
| 390 | def address(self): |
nothing calls this directly
no outgoing calls
no test coverage detected