Skip to content

Commit

Permalink
remove numpy dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Aug 29, 2024
1 parent 726de97 commit f076301
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 68 deletions.
63 changes: 1 addition & 62 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ networkx = "^3"

dask = { version = "^2024", optional = true }
distributed = { version = "^2024", optional = true }
numpy = ">=1.24,<3.0"


[tool.poetry.group.tests.dependencies]
Expand Down
11 changes: 6 additions & 5 deletions tests/test_deployment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dataclasses

import numpy as np
import random
import pytest

import znflow
Expand Down Expand Up @@ -118,12 +118,13 @@ def test_multiple_nodify_and_Node(request, deployment):

@znflow.nodify
def get_forces():
return np.random.normal(size=(100, 3))
return [random.random() for _ in range(3)]



@znflow.nodify
def concatenate(forces):
return np.concatenate(forces)
return sum(forces, [])


@pytest.mark.parametrize(
Expand All @@ -139,5 +140,5 @@ def test_concatenate(request, deployment):

graph.run()

assert isinstance(forces.result, np.ndarray)
assert forces.result.shape == (1000, 3)
assert isinstance(forces.result, list)
assert len(forces.result) == 30

0 comments on commit f076301

Please sign in to comment.