(self, arg, typecode, shape=None)
| 222 | TypeMap.update(TypeMapComplex) |
| 223 | |
| 224 | def __init__(self, arg, typecode, shape=None): |
| 225 | if isinstance(arg, (int, float, complex)): |
| 226 | if shape is None: |
| 227 | shape = () |
| 228 | else: |
| 229 | if shape is None: |
| 230 | shape = len(arg) |
| 231 | self.array = numpy.zeros(shape, typecode) |
| 232 | if isinstance(arg, (int, float, complex)): |
| 233 | arg = numpy.asarray(arg).astype(typecode) |
| 234 | self.array.fill(arg) |
| 235 | else: |
| 236 | arg = numpy.asarray(arg).astype(typecode) |
| 237 | self.array[...] = arg |
| 238 | |
| 239 | @property |
| 240 | def address(self): |
nothing calls this directly
no outgoing calls
no test coverage detected