-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
utils 'datetime_.py' 'to_timezone' function change #417
Conversation
Removed condition, 'tz != copy.copy(tz)', when converting timezone. This avoids constantly converting timezone to python timezone unless desired. When desired, to_timezone function accepts to_py_timezone argument which will enable python timezone usage when set to True.
Hi @forLinDre, sorry, I often don't get notifications from Gitter. What tests are failing? |
Hi @polakowo, Please see the list of failed tests below. Are you not getting similar results? Thank you tests\test_base.py:1445 (TestReshapeFns.test_repeat_axis0) tests\test_generic.py:786 (TestAccessors.test_funcs[count--nancnt_nb]) tests\test_indicators.py:344 (TestFactory.test_no_inputs) tests\test_portfolio.py:7252 (TestPortfolio.test_stats) tests\test_signals.py:1541 (TestAccessors.test_pos_rank) |
I run the tests and see none of the above. |
Thanks for verifying. It seems that all of the test failures I'm experiencing are pd.testing related. Would you mind providing the version of all dependencies you are running? Thank you. |
What are errors telling you? absl-py 0.13.0 |
You can see the output here: https://drive.google.com/file/d/1I_4jJg5BlAKKOBQGaDy7O_o8K1BePIsK/view?usp=sharing Here is my conda env list where you can see the versions of everything I'm running. I'm going to try to downgrade pandas and then numpy to see if that does anything before further diagnoses. Name Version Build Channelaiodns 3.0.0 pypi_0 pypi |
The errors come from your machine having the default precision of 32 bits. In Numba, the output is fixed to 64 bits while Pandas uses 32 bits floating dtype on your machine by default. This is nothing to worry about, I'll merge this pull request. |
Hi Polakowo,
I know this pull request took a while but I was hoping you would get back to me on gitter and explain how you want me to go about creating pull requests. I'm not sure if I did it correctly, but I followed one of many suggested approaches I found online. Please let me know if my process of forking, creating a branch, and then creating a pull request for that branch into your master is the proper way go about it. I did go ahead and run the tests you had set up on the full vectorbt repo before and after making changes. There were a few failed tests before and after, but those failed tests were consistent after the change. Are these failures anything we should be concerned about when it comes to using other modules in vectorbt? Thank you and take care!
Shown below are my commit comments:
Removed condition, 'tz != copy.copy(tz)', when converting timezone. This avoids constantly converting timezone to python timezone unless desired. When desired, to_timezone function accepts to_py_timezone argument which will enable python timezone usage when set to True.