ArrayClient.export(filepath, *, format=None, slice=None, link=None, template_vars=None)

Download data in some format and write to a file.

file: str or buffer

Filepath or writeable buffer.

formatstr, optional

If format is None and file is a filepath, the format is inferred from the name, like ‘table.csv’ implies format=”text/csv”. The format may be given as a file extension (“csv”) or a media type (“text/csv”).

sliceList[slice], optional

List of slice objects. A convenient way to generate these is shown in the examples.

link: str, optional

Used internally. Refers to a key in the dictionary of links sent from the server.

template_vars: dict, optional

Used internally.


Export all.

>>> a.export("numbers.csv")

Export an N-dimensional slice.

>>> import numpy
>>> a.export("numbers.csv", slice=numpy.s_[:10, 50:100])