Commit 5269bed9 authored by Klaus Wölfel's avatar Klaus Wölfel

fix getSize on empty data array

parent ee845653
......@@ -101,7 +101,11 @@ class DataArray(BigFile):
"""
Implement getSize interface for ndarray
"""
return self.getArray().nbytes
array = self.getArray()
if array is None:
return 0
else:
return self.getArray().nbytes
security.declareProtected(Permissions.AccessContentsInformation, 'getArrayShape')
def getArrayShape(self):
......
......@@ -46,9 +46,9 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:114, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:131, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:158, 10: No exception type(s) specified (bare-except)</string>
<string>W:118, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:135, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:162, 10: No exception type(s) specified (bare-except)</string>
</tuple>
</value>
</item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment