From 9bbba64686ae84bf59843b5f2042f754f6832aaa Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Mon, 19 Oct 2015 16:28:48 -0500 Subject: [PATCH] Omaha #4982 - Revert "Omaha #4982 Force matching datatypes when replacing data." This reverts commit 22c6f4e9a09d7c4dda6a6d99919d4dca85b5aa16 [formerly 4c1b632bb1825e6292c78649c741d0d89149bf12]. Former-commit-id: be9901d7537c68d43ab72ab8cbc09719ab3c7cdb --- pythonPackages/pypies/pypies/impl/H5pyDataStore.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pythonPackages/pypies/pypies/impl/H5pyDataStore.py b/pythonPackages/pypies/pypies/impl/H5pyDataStore.py index c1a47c2632..e25f10912a 100644 --- a/pythonPackages/pypies/pypies/impl/H5pyDataStore.py +++ b/pythonPackages/pypies/pypies/impl/H5pyDataStore.py @@ -45,7 +45,6 @@ # Aug 20, 2015 DR 17726 mgamazaychikov Remove __doMakeReadable method # Sep 14, 2015 4868 rjpeter Updated writePartialHDFData to create the dataset if # it doesn't exist. -# Oct 15, 2015 4982 nabowle Verify datatypes match when replacing data. # import h5py, os, numpy, pypies, re, logging, shutil, time, types, traceback @@ -191,8 +190,6 @@ class H5pyDataStore(IDataStore.IDataStore): indices.append(long(0)) ss['index'] = indices elif storeOp == 'REPLACE' or storeOp == 'OVERWRITE': - if ds.dtype != data.dtype: - raise StorageException("Cannot " + storeOp + " data of type " + ds.dtype.name + " with data of type " + data.dtype.name + ".") if ds.shape != data.shape: ds.resize(data.shape) ds[()] = data @@ -292,8 +289,6 @@ class H5pyDataStore(IDataStore.IDataStore): if dataset in group: ds=group[dataset] ss['op'] = 'REPLACE' - if ds.dtype != data.dtype: - raise StorageException("Cannot REPLACE data of type " + ds.dtype.name + " with data of type " + data.dtype.name + ".") else: if maxSizes is None: raise StorageException('Dataset ' + dataset + ' does not exist for partial write. MaxSizes not specified to create initial dataset')