-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/gizatechxyz/osiris
- Loading branch information
Showing
6 changed files
with
38 additions
and
19 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "giza-osiris" | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
description = "Osiris is a Python library designed for efficient data conversion and management, primarily transforming data into Cairo programs" | ||
authors = ["Fran Algaba <[email protected]>"] | ||
readme = "README.md" | ||
|
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,2 @@ | ||
1,2 | ||
3,4 |
Binary file not shown.
Binary file not shown.
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,25 @@ | ||
from osiris.app import convert_to_numpy, load_data | ||
from osiris.dtypes.input_output_formats import InputFormat | ||
|
||
import numpy as np | ||
|
||
|
||
def test_convert_to_numpy_from_csv(): | ||
data = load_data("tests/data/simple_tensor.csv") | ||
numpy_array = convert_to_numpy(data) | ||
assert np.array_equal(numpy_array, np.array( | ||
[[1, 2], [3, 4]], dtype=np.uint32)) | ||
|
||
|
||
def test_convert_to_numpy_from_parquet(): | ||
data = load_data("tests/data/simple_tensor.parquet") | ||
numpy_array = convert_to_numpy(data) | ||
assert np.array_equal(numpy_array, np.array( | ||
[[1, 2], [3, 4]], dtype=np.uint32)) | ||
|
||
|
||
def test_convert_to_numpy_from_npy(): | ||
data = load_data("tests/data/simple_tensor.npy") | ||
numpy_array = convert_to_numpy(data) | ||
assert np.array_equal(numpy_array, np.array( | ||
[[1, 2], [3, 4]], dtype=np.uint32)) |