Commit 7eab3578 authored by Klaus Wölfel's avatar Klaus Wölfel

DataArray: add api to access array dtype

getArrayDtype can be used for example by html5 app to display graph with correct dtype
parent d67875ef
...@@ -111,10 +111,17 @@ class DataArray(BigFile): ...@@ -111,10 +111,17 @@ class DataArray(BigFile):
security.declareProtected(Permissions.AccessContentsInformation, 'getArrayShape') security.declareProtected(Permissions.AccessContentsInformation, 'getArrayShape')
def getArrayShape(self): def getArrayShape(self):
""" """
Get numpy array shape- Get numpy array shape
""" """
return self.getArray().shape return self.getArray().shape
security.declareProtected(Permissions.AccessContentsInformation, 'getArrayDtype')
def getArrayDtype(self):
"""
Get numpy array dtype
"""
return self.getArray().dtype
security.declareProtected(Permissions.View, 'index_html') security.declareProtected(Permissions.View, 'index_html')
def index_html(self, REQUEST, RESPONSE, format=_MARKER, inline=_MARKER, **kw): def index_html(self, REQUEST, RESPONSE, format=_MARKER, inline=_MARKER, **kw):
""" """
......
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple> <tuple>
<string>W:119, 42: Redefining built-in \'format\' (redefined-builtin)</string> <string>W:126, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:136, 4: Redefining built-in \'range\' (redefined-builtin)</string> <string>W:143, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:163, 10: No exception type(s) specified (bare-except)</string> <string>W:170, 10: No exception type(s) specified (bare-except)</string>
</tuple> </tuple>
</value> </value>
</item> </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