Closed cberk17 closed 4 weeks ago
@cberk17 That sounds like reasonable behavior to me.
Parameter values must be double precision floating point numbers: Python floats. No other data types will ever work.
Perhaps you reviewing the meaning of "unsupported" would be helpful?
As you read, you could could have asked a question about how and why lmfit works. You ignored that advice and insisted that your unsupported usage was a problem that we need to solve. I would encourage you to take a different approach the next time you are looking for support or help with open source software.
First Time Issue Code
Yes, I read the instructions and I am sure this is a GitHub Issue.
Description
ModelResult.dumps
does not work for some numeric data types in its parameters. If the parameters have non-supported datatypes such asnp.float32
ornp.int32
the model result cannot be serialized to json. Although, both theParameters
object and theModelResult
object allow for keywords to be passed tojson.dumps
which should allow for a custom JSON encoder to be used, the keywords passed intoModelResult.dumps
are not propagated to theParameters.dumps
method.A Minimal, Complete, and Verifiable example
Fit report:
N/A
Error message:
Version information
Python: 3.9.11 (main, Aug 26 2024, 10:22:08) [Clang 15.0.0 (clang-1500.3.9.4)]
lmfit: 0.0.post2858+g776e14d, scipy: 1.13.1, numpy: 2.0.2,asteval: 1.0.2, uncertainties: 3.2.2
Link(s)
N/A