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

Compatibility with pandas 2.0.0 #1672

Merged
merged 3 commits into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pvlib/tests/iotools/test_ecmwf_macc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import os
import datetime
import numpy as np
import pandas as pd
import pytest
from ..conftest import requires_netCDF4, DATA_DIR
from ..conftest import requires_netCDF4, DATA_DIR, assert_index_equal
from pvlib.iotools import ecmwf_macc

TESTDATA = 'aod550_tcwv_20121101_test.nc'
Expand Down Expand Up @@ -54,10 +55,9 @@ def test_read_ecmwf_macc(expected_test_data):
"""Test reading ECMWF_MACC data from netCDF4 file."""
data = ecmwf_macc.read_ecmwf_macc(
expected_test_data, 38, -122)
expected_times = [
1351738800, 1351749600, 1351760400, 1351771200, 1351782000, 1351792800,
1351803600, 1351814400]
assert np.allclose(data.index.view(np.int64) // 1000000000, expected_times)
expected_times = pd.date_range('2012-11-01 03:00', '2012-11-02 00:00',
freq='3h').astype("datetime64[ns]")
assert_index_equal(data.index.astype("datetime64[ns]"), expected_times)
expected_aod = np.array([
0.39531226, 0.22371339, 0.18373083, 0.15010143, 0.130809, 0.11172834,
0.09741255, 0.0921606])
Expand Down