Array creation routines¶
See also
Ones and zeros¶
From existing data¶
Creating record arrays (numpy.rec)¶
Note
numpy.rec is the preferred alias for
numpy.core.records.
core.records.array(obj[, dtype, shape, ...]) |
Construct a record array from a wide-variety of objects. |
core.records.fromarrays(arrayList[, dtype, ...]) |
create a record array from a (flat) list of arrays |
core.records.fromrecords(recList[, dtype, ...]) |
create a recarray from a list of records in text form |
core.records.fromstring(datastring[, dtype, ...]) |
create a (read-only) record array from binary data contained in |
core.records.fromfile(fd[, dtype, shape, ...]) |
Create an array from binary file data |
Creating character arrays (numpy.char)¶
Note
numpy.char is the preferred alias for
numpy.core.defchararray.
core.defchararray.array(obj[, itemsize, ...]) |
Create a chararray. |
core.defchararray.asarray(obj[, itemsize, ...]) |
Convert the input to a chararray, copying the data only if necessary. |