Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: backends should have defaults for user-facing operations (#1940)
- Loading branch information
Showing
10 changed files
with
83 additions
and
86 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
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
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
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
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,22 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE | ||
|
||
import numpy as np # noqa: F401 | ||
import pytest # noqa: F401 | ||
|
||
import awkward as ak | ||
|
||
|
||
def test_typetracer(): | ||
array = ak.Array([[0, 1, 2, 3], [8, 9, 10, 11]]) | ||
typetracer = ak.Array(array.layout.typetracer) | ||
|
||
with pytest.raises(ValueError, match="internal backend"): | ||
ak.backend(typetracer) | ||
|
||
|
||
def test_typetracer_mixed(): | ||
array = ak.Array([[0, 1, 2, 3], [8, 9, 10, 11]]) | ||
typetracer = ak.Array(array.layout.typetracer) | ||
|
||
with pytest.raises(ValueError, match="internal backend"): | ||
ak.backend(typetracer, array) |