@@ -157,7 +157,7 @@ def test_missing_shape(self):
157
157
def test_long_double (self ):
158
158
""" Confirm that the default dtype is float """
159
159
# Expected failure on HSDS; skip with h5py
160
- if config .get ('use_h5py' ):
160
+ if config .get ('use_h5py' ) or platform . system () == 'Windows' :
161
161
self .assertTrue (False )
162
162
163
163
dset = self .f .create_dataset ('foo' , (63 ,), dtype = np .longdouble )
@@ -1671,7 +1671,13 @@ def test_scalar_compound(self):
1671
1671
1672
1672
class TestVlen (BaseDataset ):
1673
1673
def test_int (self ):
1674
- dt = h5py .vlen_dtype (int )
1674
+ if platform .system () == "Windows" :
1675
+ # default np int type is 32 bit
1676
+ dt = h5py .vlen_dtype (np .int32 )
1677
+ else :
1678
+ # defualt np int type is 64 bit
1679
+ dt = h5py .vlen_dtype (np .int64 )
1680
+
1675
1681
ds = self .f .create_dataset ('vlen' , (4 ,), dtype = dt )
1676
1682
ds [0 ] = np .arange (3 )
1677
1683
ds [1 ] = np .arange (0 )
@@ -1708,7 +1714,12 @@ def test_reuse_struct_from_other(self):
1708
1714
self .f .create_dataset ('vlen2' , (1 ,), self .f ['vlen' ]['b' ][()].dtype )
1709
1715
1710
1716
def test_convert (self ):
1711
- dt = h5py .vlen_dtype (int )
1717
+ if platform .system () == "Windows" :
1718
+ # default np int type is 32 bit
1719
+ dt = h5py .vlen_dtype (np .int32 )
1720
+ else :
1721
+ # defualt np int type is 64 bit
1722
+ dt = h5py .vlen_dtype (np .int64 )
1712
1723
ds = self .f .create_dataset ('vlen' , (3 ,), dtype = dt )
1713
1724
ds [0 ] = np .array ([1.4 , 1.2 ])
1714
1725
ds [1 ] = np .array ([1.2 ])
@@ -1725,7 +1736,13 @@ def test_convert(self):
1725
1736
self .assertArrayEqual (ds [1 ], np .arange (3 ))
1726
1737
1727
1738
def test_multidim (self ):
1728
- dt = h5py .vlen_dtype (int )
1739
+ if platform .system () == "Windows" :
1740
+ # default np int type is 32 bit
1741
+ dt = h5py .vlen_dtype (np .int32 )
1742
+ else :
1743
+ # defualt np int type is 64 bit
1744
+ dt = h5py .vlen_dtype (np .int64 )
1745
+
1729
1746
ds = self .f .create_dataset ('vlen' , (2 , 2 ), dtype = dt )
1730
1747
# ds[0, 0] = np.arange(1)
1731
1748
ds [:, :] = np .array ([[np .arange (3 ), np .arange (2 )],
0 commit comments