Skip to content
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

Unable to get default parameters of STL function #8701

Open
Ashish-Tiger opened this issue Feb 24, 2023 · 2 comments
Open

Unable to get default parameters of STL function #8701

Ashish-Tiger opened this issue Feb 24, 2023 · 2 comments

Comments

@Ashish-Tiger
Copy link

Ashish-Tiger commented Feb 24, 2023

Describe the bug

I am trying to get default argument of the SYL function but unable to get the saem. Also, it doesnt seem there is anything called "text__signature" which can be used by inspect library to get a signature of the init.

Code Sample, a copy-pastable example if possible

import statsmodels.tsa.seasonal.STL
import inspect 
inspect.signature(STL.__init__)
# <Signature (self, /, *args, **kwargs)>

Note: As you can see, there are many issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates.

Note: Please be sure you are using the latest released version of statsmodels, or a recent build of main. If your problem has been fixed in an unreleased version, you might be able to use main until a new release occurs.

Note: If you are using a released version, have you verified that the bug exists in the main branch of this repository? It helps the limited resources if we know problems exist in the current main branch so that they do not need to check whether the code sample produces a bug in the next release.

If the issue has not been resolved, please file it in the issue tracker.

Expected Output

expect output:

<Signature (self, endog, period=None, seasonal=7, trend=None, low_pass=None,
        seasonal_deg=1, trend_deg=1, low_pass_deg=1, robust=False,
        seasonal_jump=1, trend_jump=1, low_pass_jump=1)

Output of import statsmodels.api as sm; sm.show_versions()

[paste the output of import statsmodels.api as sm; sm.show_versions() here below this line]

INSTALLED VERSIONS

Python: 3.10.8.final.0
OS: Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF-8

statsmodels

Installed: 0.13.5 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/statsmodels)

Required Dependencies

cython: Not installed
numpy: 1.23.5 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/numpy)
scipy: 1.10.0 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/scipy)
pandas: 1.5.2 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/pandas)
dateutil: 2.8.2 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/dateutil)
patsy: 0.5.3 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/patsy)

Optional Dependencies

matplotlib: 3.6.2 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/matplotlib)
backend: module://matplotlib_inline.backend_inline
cvxopt: Not installed
joblib: 1.2.0 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/joblib)

Developer Tools

IPython: 8.8.0 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/IPython)
jinja2: 3.1.2 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/jinja2)
sphinx: Not installed
pygments: 2.14.0 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/pygments)
pytest: 7.1.2 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/pytest)
virtualenv: 20.17.1 (/home/user1/miniconda3/envs/ADT/lib/python3.10/site-packages/virtualenv)

@bashtage
Copy link
Member

This is a limitation of Cython code I believe. Not sure there is much we can do about it. Might be possible to use bindings to populate the signature, but I think it still won't get defaults.

@Ashish-Tiger
Copy link
Author

Ashish-Tiger commented Feb 27, 2023

@bashtage Yes, I read about this particular binding binding (True / False) option.

Compiler directives

Stackoverflow link:
https://stackoverflow.com/questions/46033277/how-to-introspect-a-function-defined-in-a-cython-c-extension-module

Just trying to understand if there is a way to implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants