-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test: add test for #1403 * Fix: correct typo `ListArray64`
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE | ||
|
||
import pytest # noqa: F401 | ||
import awkward as ak # noqa: F401 | ||
import numpy as np | ||
|
||
|
||
def test_unicode(): | ||
data = np.array(["this", "that"]) | ||
array = ak._v2.from_numpy(data) | ||
assert array.to_list() == ["this", "that"] | ||
|
||
|
||
def test_bytes(): | ||
data = np.array([b"this", b"that"], dtype="S") | ||
array = ak._v2.from_numpy(data) | ||
assert array.to_list() == [b"this", b"that"] |