Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Mar 18, 2024
1 parent a279e4a commit 5cb0305
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language : 'cpp')
add_project_arguments('-DNPY_TARGET_VERSION=NPY_1_21_API_VERSION', language : 'c')
add_project_arguments('-DNPY_TARGET_VERSION=NPY_1_21_API_VERSION', language : 'cpp')

if build_machine.system() == 'darwin'
# error: pragma diagnostic pop could not pop, no matching push
add_project_arguments('-Wno-unknown-pragmas')
endif

if fs.exists('_version_meson.py')
py.install_sources('_version_meson.py', subdir: 'pandas')
Expand Down
5 changes: 2 additions & 3 deletions pandas/_libs/tslibs/conversion.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def cast_from_unit_vectorized(
int64_t m
int p
NPY_DATETIMEUNIT in_reso, out_reso
Py_ssize_t i
Py_ssize_t i = 0

assert values.dtype.kind == "f"

Expand Down Expand Up @@ -148,9 +148,8 @@ def cast_from_unit_vectorized(
if p:
frac = np.round(frac, p)

rng = range(len(values))
try:
for i in rng:
for i in range(len(values)):
if base[i] == NPY_NAT:
out[i] = NPY_NAT
else:
Expand Down

0 comments on commit 5cb0305

Please sign in to comment.