Skip to content
Snippets Groups Projects
Commit 7470eaa5 authored by Alan De Smet's avatar Alan De Smet
Browse files

Statistics now work on scalar values (0d arrays)

For variables who shape is "0" (that is, a simple scalar value), statistics calculations now work.  Although many of the statistics are silly, this is useful for report generation.

Implementation: DataObject has a new function "holding_array" which in most cases returns itself. But if self.data.shape==0, it returns a copy of itself with self.data's scalar value tossed into a single element array.  Now that the data is an array, as expected, the statistics code works fine.
parent 44a95c78
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment