Skip to content

Commit

Permalink
replace numpy.core.defchararray.add with numpy.strings.add
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Apr 29, 2024
1 parent b32186b commit c8b74d4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions xarray/tests/test_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import pandas as pd
import pytest
from numpy.core import defchararray

import xarray as xr
from xarray.core import formatting
Expand Down Expand Up @@ -770,9 +769,9 @@ def test_repr_file_collapsed(tmp_path) -> None:
)
def test__mapping_repr(display_max_rows, n_vars, n_attr) -> None:
long_name = "long_name"
a = defchararray.add(long_name, np.arange(0, n_vars).astype(str))
b = defchararray.add("attr_", np.arange(0, n_attr).astype(str))
c = defchararray.add("coord", np.arange(0, n_vars).astype(str))
a = np.strings.add(long_name, np.arange(0, n_vars).astype(str))

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 bare-minimum

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 bare-minimum

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 bare-minimum

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 bare-minimum

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 all-but-dask

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 all-but-dask

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 all-but-dask

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 all-but-dask

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.11

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.11

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.11

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.11

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.9

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.9

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.9

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.9

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 flaky

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 flaky

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 flaky

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 flaky

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 min-all-deps

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 min-all-deps

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 min-all-deps

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9 min-all-deps

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.12

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.12

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.12

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.12

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'. Did you mean: 'string_'?

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.11

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.11

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.11

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.11

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9

test__mapping_repr[50-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9

test__mapping_repr[35-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9

test__mapping_repr[11-40-30] AttributeError: module 'numpy' has no attribute 'strings'

Check failure on line 772 in xarray/tests/test_formatting.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.9

test__mapping_repr[1-40-30] AttributeError: module 'numpy' has no attribute 'strings'
b = np.strings.add("attr_", np.arange(0, n_attr).astype(str))
c = np.strings.add("coord", np.arange(0, n_vars).astype(str))
attrs = {k: 2 for k in b}
coords = {_c: np.array([0, 1], dtype=np.uint64) for _c in c}
data_vars = dict()
Expand Down

0 comments on commit c8b74d4

Please sign in to comment.