[NumPy-Tickets] [NumPy] #1888: Multi-dimensionial array support for savetxt / loadtxt
NumPy Trac
numpy-tickets@scipy....
Thu Jun 30 04:26:08 CDT 2011
#1888: Multi-dimensionial array support for savetxt / loadtxt
--------------------------+-------------------------------------------------
Reporter: NeilenMarais | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: |
--------------------------+-------------------------------------------------
I think it would be feasible to support multi-dimensional saving/loading
quite simply by using multiple line-breaks for 'higher-dimensional'
linebreaks.
{{{
d3D = numpy.array([[[111, 112], [121, 122]],
[[211, 212], [221, 222]]])
}}}
could be written to text quite unambigiously as
{{{
111 112
121 122
<--- two line breaks indicate break in the 3rd dimension
211 212
221 222
}}}
Similarly, 3 line breaks could indicate a break in the 4th dimension.
Another option would be to have the option to write out text in nested-
list format. I.e., simply write
[[[111, 112], [121, 122]], [[211, 212], [221, 222]]]
to the file.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1888>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list