@@ -711,37 +711,6 @@ def netcdf_shared_dimensions(source_var, target_var):
711
711
return result
712
712
713
713
714
-
715
- # def netcdf_shared_dimensions(source_var, target_var):
716
- # result = OrderedDict((('sourceReshape', OrderedDict()),
717
- # ('targetReshape', OrderedDict())))
718
- # source_dims = OrderedDict(zip(source_var.dimensions, source_var.shape))
719
- # target_dims = OrderedDict(zip(target_var.dimensions, target_var.shape))
720
- # initial = OrderedDict((('sourceReshape', source_dims),
721
- # ('targetReshape', target_dims)))
722
-
723
- # if list(target_dims.keys())[0] not in source_dims.keys():
724
- # result['sourceReshape'] = OrderedDict(list(target_dims.items()) +
725
- # list(source_dims.items()))
726
- # result['targetReshape'] = OrderedDict(list(target_dims.items()) +
727
- # list(source_dims.items()))
728
- # else:
729
- # result['sourceReshape'] = OrderedDict(list(source_dims.items()) +
730
- # list(target_dims.items()))
731
- # result['targetReshape'] = OrderedDict(list(source_dims.items()) +
732
- # list(target_dims.items()))
733
- # for k in result:
734
- # for rk in result[k]:
735
- # if rk not in initial[k]:
736
- # result[k][rk] = 1
737
- # # check overall nValues is consistent
738
- # # is this validation?
739
- # # or, can this only be a code bug, given nc dims???
740
- # for k in result:
741
- # if six.moves.reduce(operator.mul, [i[1] for i in result[k].items()], 1) != six.moves.reduce(operator.mul, [i[1] for i in initial[k].items()], 1):
742
- # raise ValueError('Reshape lists must have the same count for the multiplication of elements')
743
- # return result
744
-
745
714
@contextlib .contextmanager
746
715
def load (afilepath ):
747
716
if afilepath .endswith ('.hdf' ):
@@ -1097,7 +1066,6 @@ def _make_ref_entities(var, fhandle, pref, name, baseuri,
1097
1066
refset .add (ref_node )
1098
1067
var .attrs ['bald__references' ] = refset
1099
1068
except ValueError :
1100
- import pdb ; pdb .set_trace ()
1101
1069
# Indexing and dimension identification can fail, especially
1102
1070
# with unexpectedy formated files. Fail silently on load, to
1103
1071
# that a partial graph may be returned. Issues like this are
0 commit comments