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

bug: datetime64[ns] and datetime64[s] #1958

Closed
peterdudfield opened this issue Jan 31, 2024 · 3 comments
Closed

bug: datetime64[ns] and datetime64[s] #1958

peterdudfield opened this issue Jan 31, 2024 · 3 comments

Comments

@peterdudfield
Copy link

peterdudfield commented Jan 31, 2024

I found a different when using datetime64[ns] and datetime64[s]

pvlib version == 0.10.2
numpy version == 1.23.2
This was on a Mac Big Sur 11.3.1
python 3.10

import pvlib
import numpy as np

dt = np.array([datetime(2024,1,31, 12,0), datetime(2024,1,31,12,30)], dtype='datetime64[s]')

solpos = pvlib.solarposition.get_solarposition(
            time=dt,
            latitude=50,
            longitude=0)

Perhaps I don't fully understand the different between [ns] and [s] but would be great if anyone can help on this

openclimatefix/ocf_datapipes#272

@peterdudfield peterdudfield changed the title datetime64[ns] and datetime64[s] bug: datetime64[ns] and datetime64[s] Jan 31, 2024
@cwhanse
Copy link
Member

cwhanse commented Jan 31, 2024

Thanks @peterdudfield this results from pandas >= 2.0 #1932 and is being accomodated in pvlib with #1948

@peterdudfield
Copy link
Author

Thanks @cwhanse for the quick response

@kandersolar
Copy link
Member

Duplicate of #1932, fixed by #1948

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

3 participants