We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using python plot examples with np.linspace(...) instead of list literal [...], it fails with json error:
np.linspace(...)
[...]
~\Anaconda3\lib\site-packages\beakerx\plot\chart.py in add(self, item) 222 def add(self, item): 223 self.chart.add(item) --> 224 self.model = self.chart.transform() 225 return self 226 ~\Anaconda3\lib\site-packages\beakerx\utils.py in transform(self) 46 47 def transform(self): ---> 48 model = json.dumps(self, cls=ObjectEncoder) 49 return json.loads(model) 50 ~\Anaconda3\lib\json\__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw) 236 check_circular=check_circular, allow_nan=allow_nan, indent=indent, 237 separators=separators, default=default, sort_keys=sort_keys, --> 238 **kw).encode(obj) 239 240 ~\Anaconda3\lib\json\encoder.py in encode(self, o) 197 # exceptions aren't as detailed. The list call should be roughly 198 # equivalent to the PySequence_Fast that ''.join() would do. --> 199 chunks = self.iterencode(o, _one_shot=True) 200 if not isinstance(chunks, (list, tuple)): 201 chunks = list(chunks) ~\Anaconda3\lib\json\encoder.py in iterencode(self, o, _one_shot) 255 self.key_separator, self.item_separator, self.sort_keys, 256 self.skipkeys, _one_shot) --> 257 return _iterencode(o, 0) 258 259 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, ValueError: Circular reference detected
The text was updated successfully, but these errors were encountered:
Adding tolist() to arguments solves the problem. Seems to be specific ndarray problem.
tolist()
Sorry, something went wrong.
#7668 fix for handling ndarray as xygraphics argument
1240a67
#7668 fix for handling ndarray as xygraphics argument (#7696)
440d1f2
No branches or pull requests
When using python plot examples with
np.linspace(...)
instead of list literal[...]
, it fails with json error:The text was updated successfully, but these errors were encountered: