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

fixed the problem causing the import error with numpy2 #800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

XotEmBotZ
Copy link

fixes #799

changed NaN to nan for numpy 2.0 support

@XotEmBotZ
Copy link
Author

The numpy is causing these errors and hindering the containers that are used. Kindly can you fast track this to main? This would at least prevent further damage.

@twopirllc
Copy link
Owner

Hello @XotEmBotZ,

I will leave this up here for those that want to manually apply to v0.3.14b. However in the original #799, the request was for a development branch fix. If you have a fix for that, development, then I have no issue applying it.

Kind Regards,
KJ

@XotEmBotZ
Copy link
Author

I have a question here,Since this is a non breaking change, can I know the reason for holding the merge? As this would allow the this version to be used with numpy2 till the development of v0.4 finishes.

@twopirllc
Copy link
Owner

@XotEmBotZ,

While it's quite likely not a breaking change, I frankly do not have the free time to address it in the event that it is. I have seen stranger things happen. 😅 It would be a different situation under different conditions.

But more importantly, thanks for providing a solution. 😎

@PilotGFX
Copy link

PilotGFX commented Aug 27, 2024

Nice.

pip install -U git+https://github.com/twopirllc/pandas-ta downgraded my numpy from 2.1 to 1.26.4
im one of those special people who prefer to fiddle with version mismatches than use a environment(conda etc). when i eventually need numpy 2.1 for other project i will just change the line from NaN to nan in the lib, as XotEmBotZ has provided.

So its not urgent to include yet, i should be able to sort myself out.

@grzesir
Copy link

grzesir commented Nov 9, 2024

@twopirllc any updates on this? numpy 2 is not functional and causing serious problems when trying to use this package. pandas_ta is no longer usable because many libraries now require numpy 2

@grzesir
Copy link

grzesir commented Nov 9, 2024

can we please merge this and depoy?

@grzesir
Copy link

grzesir commented Nov 9, 2024

Since this library does not seem to be in development anymore (or doesnt seem to care about support for python 3.12) i have created a fork that works with numpy 2. See it here: https://github.com/grzesir/pandas-ta-numpy-2

@grzesir
Copy link

grzesir commented Nov 9, 2024

Here's an example of using the fixed numpy 2 version in a requirements.txt

lumibot>=3.8.6
git+https://github.com/grzesir/pandas-ta-numpy-2.git@main#egg=pandas-ta
alpaca_trade_api

@PilotGFX
Copy link

PilotGFX commented Nov 9, 2024 via email

@mls149
Copy link

mls149 commented Nov 10, 2024

@grzesir : Thanks for the fix, I need this as I'm running pandas_ta inside a Github action, so manually updating the pandas_ta source file won't work for me.

@grzesir
Copy link

grzesir commented Nov 10, 2024

@grzesir : Thanks for the fix, I need this as I'm running pandas_ta inside a Github action, so manually updating the pandas_ta source file won't work for me.

Yea same. Happy to help!

@grzesir
Copy link

grzesir commented Nov 10, 2024

I've used ta lib in the past and definitely prefer this library, just wish the author kept it up to date

@twopirllc
Copy link
Owner

Hello @grzesir, @PilotGFX, @mls149

I have addressed and explained this already. 😑 Most notably in the following Issues and PRs: #799, #801, #811, #836. Please read (again) and follow any and all relevant links for extra details. Furthermore, please familiarize yourself the Guidelines.

In short, based on the my replies in those posts:

  • It's not dead nor is it a high churn library. Please use the development version. 😎
  • Pandas TA depends on TA Lib which also has Numpy 2 issues. 🤷🏼‍♂️
    • Please advise on expediting the Numpy 2 fix for TA Lib so there is no more log jam and everyone benefits.
  • Python 3.12 removed setuptools, hence it is required for installation. Furthermore, it is listed in the development requirements.txt.

Kind Regards,
KJ

@grzesir
Copy link

grzesir commented Nov 11, 2024 via email

@twopirllc
Copy link
Owner

Via git or Local Install.

See: Pandas TA - Getting Started or Pandas TA - Development README

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

Successfully merging this pull request may close these issues.

Pandas-ta doesnt work with numpy 2.0
5 participants