New issue
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
BUG: scipy.stats.logistic.fit cannot fitting any parameters #16204
Comments
Hi @HZT3434, thank you for reporting. Can you list a complete reproducible example? What is |
Hi. The data x is a numpy array. When I run my script on python 3.9 the program did not scream for the same error. It can be the python problem. Thanks for the quick respond.
|
I cannot reproduce the issue on Python 3.10 with the latest released version nor the development version. import scipy.stats as stats
x = stats.logistic.rvs(size=10)
stats.logistic.fit(x)
# (0.6128791075218377, 0.7050674549310291) |
Can you give more details about |
Hi. I have checked the versions and here is the setting for a successful run of my script. I have attached my program. Dtypes of x is np.float64, range of x is [-0.095893, 0.069124], shape(x) is (749999,).
Hope the info can be useful. Thank you!
Regards,
Huang
At 2022-05-18 17:08:32, "Pamphile Roy" ***@***.***> wrote:
Can you give more details about x? The dtype, shape, range, etc. could help.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This looks like the problem with all-but-the-latest Cython, Python 3.10, and some kind of debugger or tracer being used (c.f. numpy/numpy#21519) |
Nothing to do but wait for the release cycles of numpy (1.22.4 should have the fix) and scipy (don't see anything about it in the 1.8.1 release notes) to churn through with the latest Cython being used. In the meantime, avoid using a debugger. |
Thank you for the respond. Now I will work with the stable release for the project.
Regards,
Huang
At 2022-05-19 10:34:29, "Robert Kern" ***@***.***> wrote:
This looks like the problem with all-but-the-latest Cython, Python 3.10, and some kind of debugger or tracer being used (c.f. numpy/numpy#21519)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
OK. Thanks!
Regards,
Huang
At 2022-05-19 10:40:12, "Robert Kern" ***@***.***> wrote:
Nothing to do but wait for the release cycles of numpy (1.22.4 should have the fix) and scipy (don't see anything about it in the 1.8.1 release notes) to churn through with the latest Cython being used. In the meantime, avoid using a debugger.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Does that mean we can close this? |
Yes, please close it.
Regards,
Huang
…---- Replied Message ----
| From | Matt ***@***.***> |
| Date | 05/19/2022 10:48 |
| To | ***@***.***> |
| Cc | ***@***.******@***.***> |
| Subject | Re: [scipy/scipy] BUG: scipy.stats.logistic.fit cannot fitting any parameters (Issue #16204) |
Does that mean we can close this?
@HZT3434 is your problem resolved when you are not using a debugger?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The new Cython version has been released, and a new numpy version has been compiled based on that. What's the scipy status in this regard? |
@cartisan we have several jobs in CI using latest Cython and latest (even main branch) NumPy. See https://github.com/scipy/scipy/blob/main/.github/workflows/linux.yml for instance. Can you give more details? |
@tupui I have been able to zero in the error to the latest pandas version, which apparently is not yet built using the new Cyton. Sorry for stirring up the old thread! |
@cartisan no worries. Thank you for the precisions, all "good" then. |
By disabling debugging, this has stopped development here. Optimization of runtimes while debugging is a far lower priority than is debugging itself. Why is it so difficult to disable cython's optimization of debugging runtimes so we can get on with debugging hence development? PS: PYDEVD_USE_CYTHON=NO is set but doesn't re-enable debugging. |
@jabowery I don't think I follow what you are trying to say. |
Describe your issue.
When I call for logistic.fit(), it returns error say that there is a type error, during the optimzation it occurs None type value.
Reproducing Code Example
Error message
SciPy/NumPy/Python version information
1.8.0 1.22.3 sys.version_info(major=3, minor=10, micro=3, releaselevel='final', serial=0)
The text was updated successfully, but these errors were encountered: