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

All Samples(86)  |  Call(86)  |  Derive(0)  |  Import(0)

src/h/5/h5py-2.3.0/h5py/tests/test_group.py   h5py(Download)
        baz = self.f1['baz']
        self.assertIsInstance(baz, Group)
        self.assertArrayEqual(baz['bar'], np.array([1,2,3]))
 
    @ut.skipIf(h5py.version.hdf5_version_tuple < (1,8,9),
        baz = self.f1['baz']
        self.assertIsInstance(baz, Group)
        self.assertArrayEqual(baz['foo/bar'], np.array([1,2,3]))
 
        self.f1.copy('foo', self.f2['/'])
        self.assertIsInstance(self.f2['/foo'], Group)
        self.assertArrayEqual(self.f2['foo/bar'], np.array([1,2,3]))
        baz = self.f1['baz']
        self.assertIsInstance(baz, Group)
        self.assertArrayEqual(baz['bar'], np.array([1,2,3]))
 
        self.f2.copy(foo, 'foo')
        self.assertIsInstance(self.f2['/foo'], Group)
        self.assertArrayEqual(self.f2['foo/bar'], np.array([1,2,3]))

src/h/5/h5py-HEAD/h5py/tests/test_group.py   h5py(Download)
        baz = self.f1['baz']
        self.assertIsInstance(baz, Group)
        self.assertArrayEqual(baz['bar'], np.array([1,2,3]))
 
    @ut.skipIf(h5py.version.hdf5_version_tuple < (1,8,9),
        baz = self.f1['baz']
        self.assertIsInstance(baz, Group)
        self.assertArrayEqual(baz['foo/bar'], np.array([1,2,3]))
 
        self.f1.copy('foo', self.f2['/'])
        self.assertIsInstance(self.f2['/foo'], Group)
        self.assertArrayEqual(self.f2['foo/bar'], np.array([1,2,3]))
        baz = self.f1['baz']
        self.assertIsInstance(baz, Group)
        self.assertArrayEqual(baz['bar'], np.array([1,2,3]))
 
        self.f2.copy(foo, 'foo')
        self.assertIsInstance(self.f2['/foo'], Group)
        self.assertArrayEqual(self.f2['foo/bar'], np.array([1,2,3]))

src/p/r/praxes-HEAD/praxes/io/spec/tests/test_scan.py   praxes(Download)
    def test_data(self):
        data = self.f['1'].data
        self.assertEqual(data[0, 0], -1)
        self.assertArrayEqual(data[:, 0], np.array([-1, 0, 1]))
        self.assertArrayEqual(data[..., 0], np.array([-1, 0, 1]))
        self.assertArrayEqual(data[:2, 0], np.array([-1, 0]))
        self.assertArrayEqual(data[1:, 0], np.array([0, 1]))
        self.assertArrayEqual(data[1:2, 0], np.array([0]))

src/p/r/praxes-HEAD/praxes/io/phynx/tests/test_dataset.py   praxes(Download)
    def test_create(self):
        self.f['foo'] = [0,1,2,3]
        self.assertArrayEqual(self.f['foo'], np.array([0,1,2,3]))
        self.f.create_dataset('bar', data=np.array([1,2,3]), type='Axis')
        self.assertArrayEqual(self.f['bar'], np.array([1,2,3]))
        self.assertTrue(isinstance(self.f['bar'], registry['Axis']))
        self.f.create_dataset('baz', shape=[2,2], dtype='f')
        self.assertArrayEqual(self.f['baz'], np.array([[0,0],[0,0]], 'f'))

src/h/5/h5py-2.3.0/h5py/tests/test_slicing.py   h5py(Download)
    def test_negative_stop(self):
        """ Negative stop indexes work as they do in NumPy """
        self.assertArrayEqual(self.dset[2:-2], self.arr[2:-2])
 
class TestArraySlicing(BaseSlicing):

src/h/5/h5py-HEAD/h5py/tests/test_slicing.py   h5py(Download)
    def test_negative_stop(self):
        """ Negative stop indexes work as they do in NumPy """
        self.assertArrayEqual(self.dset[2:-2], self.arr[2:-2])
 
class TestArraySlicing(BaseSlicing):