Feature #2469

PythonAPI: make 'result' more pythonic

Added by wuttke 7 months ago. Updated 4 months ago.

Status:BacklogStart date:25 Jun 2020
Priority:NormalDue date:
Assignee:-% Done:


Target version:v2.0


From notes by Thomas Rod:

'result' seems to some kind of swig object rather than just a python object. This seems a bit overkill

result.histogram2d kills the kernel. This should just be a 2d array representing the histogram, which is directly plotable with matplotlib.
Alternatively a pandas DataFrame could be useful, this would easily enable the user to plot with different units.

MultiLayer should behave like a list or perhaps an ordered dictionary, e.g. class Multilayer(list):

Online documentation is not comprehensive (e.g. sample?)
Would be nice if the the following worked: plt.plot(*result)

It should be easy to convert result to array (and DataFrame)

It would be useful if result was of a Python or numpy builtin type so users readily would know how to deal with it.
Many operations on result e.g. list(result) cause the kernel to fail rather than throwing an exception.
This is pretty bad from a usability point of view.


#1 Updated by wuttke 7 months ago

  • Target version set to v2.0

API breaking, therefore scheduled for 2.0

#2 Updated by wuttke 4 months ago

  • Status changed from New to Backlog

Also available in: Atom PDF