Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/p/y/pylearn2-HEAD/pylearn2/datasets/tests/test_npy_npz.py   pylearn2(Download)
from pylearn2.datasets.npy_npz import NpyDataset, NpzDataset
import unittest
from pylearn2.testing.skip import skip_if_no_data
import numpy as np
import os
    npy = NpyDataset(file='test.npy')
    npy._deferred_load()
    npz = NpzDataset(file='test.npz', key='arr_0')
    assert np.all(npy.X == npz.X)
    os.remove('test.npy')