A few small style changes to MetaArray.py
This commit is contained in:
parent
2eca4ed775
commit
5a21d59538
|
@ -175,13 +175,13 @@ class MetaArray(object):
|
||||||
elif type(info[i]['values']) is not np.ndarray:
|
elif type(info[i]['values']) is not np.ndarray:
|
||||||
raise Exception("Axis values must be specified as list or ndarray")
|
raise Exception("Axis values must be specified as list or ndarray")
|
||||||
if info[i]['values'].ndim != 1 or info[i]['values'].shape[0] != self.shape[i]:
|
if info[i]['values'].ndim != 1 or info[i]['values'].shape[0] != self.shape[i]:
|
||||||
raise Exception("Values array for axis %d has incorrect shape. (given %s, but should be %s)" %\
|
raise Exception("Values array for axis %d has incorrect shape. (given %s, but should be %s)" %
|
||||||
(i, str(info[i]['values'].shape), str((self.shape[i],))))
|
(i, str(info[i]['values'].shape), str((self.shape[i],))))
|
||||||
if i < self.ndim and 'cols' in info[i]:
|
if i < self.ndim and 'cols' in info[i]:
|
||||||
if not isinstance(info[i]['cols'], list):
|
if not isinstance(info[i]['cols'], list):
|
||||||
info[i]['cols'] = list(info[i]['cols'])
|
info[i]['cols'] = list(info[i]['cols'])
|
||||||
if len(info[i]['cols']) != self.shape[i]:
|
if len(info[i]['cols']) != self.shape[i]:
|
||||||
raise Exception('Length of column list for axis %d does not match data. (given %d, but should be %d)' %\
|
raise Exception('Length of column list for axis %d does not match data. (given %d, but should be %d)' %
|
||||||
(i, len(info[i]['cols']), self.shape[i]))
|
(i, len(info[i]['cols']), self.shape[i]))
|
||||||
self._info = info
|
self._info = info
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user