| |
- arrayfrombuffer(...)
- arrayfrombuffer(buf, typecode='l') makes an array whose data is in buf
This function makes a new Numeric array whose data is stored in
buf, a read-write buffer object; for example, a read-write mmap
object. Any changes to the array will change the data in buf,
and any changes to the data in buf will change the array.
The typecode is optional; it defaults to 'l', like fromstring's.
This is useful, for example, for storing an array in a
memory-mapped file or a shared-memory segment, or just for
avoiding memory-to-memory copying.
I considered supporting read-only buffers, but Numeric doesn't
support read-only arrays at the moment, and I don't need them for
my application.
|