-
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.
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE | ||
|
||
from __future__ import absolute_import | ||
|
||
import pytest # noqa: F401 | ||
import numpy as np # noqa: F401 | ||
import awkward as ak # noqa: F401 | ||
|
||
from awkward._v2.tmp_for_testing import v1_to_v2, v1_to_v2_index | ||
|
||
pytestmark = pytest.mark.skipif( | ||
ak._util.py27, reason="No Python 2.7 support in Awkward 2.x" | ||
) | ||
|
||
def test(): | ||
np_data = np.random.random(size=(4, 100 * 1024 * 1024 // 8 // 4)) | ||
array = ak.from_numpy(np_data, regulararray=False) | ||
array = v1_to_v2(array.layout) | ||
|
||
assert np_data.nbytes == array.nbytes() |