def loadbinary(fname):
X = np.load(fname)<EOL>if isinstance(X, np.lib.npyio.NpzFile):<EOL><INDENT>if '<STR_LIT>' in X.files:<EOL><INDENT>coloring = X['<STR_LIT>'].tolist()<EOL><DEDENT>else:<EOL><INDENT>coloring = None<EOL><DEDENT>if '<STR_LIT:data>' in X.files:<EOL><INDENT>return [X['<STR_LIT:data>'], X['<STR_LIT:data>'].dtype, coloring]<EOL><DEDENT>else:<EOL><INDENT>return [None, None, coloring]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return [X, X.dtype, None]<EOL><DEDENT>
Load a numpy binary file or archive created by tabular.io.savebinary.

Load a numpy binary file (``.npy``) or archive (``.npz``) created by 
:func:`tabular.io.savebinary`.

The data and associated data type (e.g. `dtype`, including if given, column 
names) are loaded and reconstituted.

If `fname` is a numpy archive, it may contain additional data giving 
hierarchical column-oriented structure (e.g. `coloring`).  See 
:func:`tabular.tab.tabarray.__new__` for more information about coloring.

The ``.npz`` file is a zipped archive created using :func:`numpy.savez` and 
containing one or more ``.npy`` files, which are NumPy binary files created 
by :func:`numpy.save`.

**Parameters**

    **fname** : string or file-like object

        File name or open numpy binary file (``.npy``) or archive 
        (``.npz``) created by :func:`tabular.io.savebinary`.

        * When `fname` is a ``.npy`` binary file, it is reconstituted as a 
          flat ndarray of data, with structured dtype.

        * When `fname` is a ``.npz`` archive, it contains at least one 
          ``.npy`` binary file and optionally another:

        * ``data.npy`` must be in the archive, and is reconstituted as `X`, 
          a flat ndarray of data, with structured dtype, `dtype`.

        * ``coloring.npy``, if present is reconstitued as `coloring`, a 
          dictionary.

**Returns**

    **X** : numpy ndarray with structured dtype

        The data, where each column is named and is of a uniform NumPy data 
        type.

    **dtype** :  numpy dtype object

        The data type of `X`, e.g. `X.dtype`.

    **coloring** :  dictionary, or None

        Hierarchical structure on the columns given in the header of the 
        file; an attribute of tabarrays.

    See :func:`tabular.tab.tabarray.__new__` for more information about 
    coloring.

**See Also:**

    :func:`tabular.io.savebinary`, :func:`numpy.load`, 
    :func:`numpy.save`, :func:`numpy.savez`