On 04/06/17 20:04, Mikhail V wrote:
> Initialize array from a string currently looks like:
>
> s= "012 abc"
> A= fromstring(s,"u1")
> print A ->
> [48 49 50 32 97 98 99]
>
> Perfect.
> Now when writing values it will not work
> as IMO it should, namley consider this example:
>
> B= zeros(7,"u1")
>
Array and string interoperability
Just sharing my thoughts and few ideas about simplification of casting
strings to arrays.
In examples assume Numpy is in the namespace (from numpy import *)
Initialize array from a string currently looks like:
s= "012 abc"
A= fromstring(s,"u1")
print A ->
[48 49