Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson authored Sep 4, 2024
2 parents 698f6db + ea1f17e commit e1f6c32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def check_wall(pre_state, new_state, wall, wall_closenes=1e-5, tolerance=1e-9):
larger_than_zero = intersection >= 0

# If condition is true, then the points cross the wall
cross_wall = np.alltrue(np.logical_and(smaller_than_one, larger_than_zero))
cross_wall = np.all(np.logical_and(smaller_than_one, larger_than_zero))
if cross_wall:
new_state = (intersection[-1] - wall_closenes) * (new_state - pre_state) + pre_state

Expand Down
2 changes: 1 addition & 1 deletion neuralplayground/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def check_crossing_wall(
larger_than_zero = intersection >= 0

# If condition is true, then the points cross the wall
cross_wall = np.alltrue(np.logical_and(smaller_than_one, larger_than_zero))
cross_wall = np.all(np.logical_and(smaller_than_one, larger_than_zero))
if cross_wall:
new_state = (intersection[-1] - wall_closenes) * (new_state - pre_state) + pre_state

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ ignore = [
[tool.ruff]
line-length = 127
exclude = ["__init__.py","build",".eggs"]
select = ["I", "E", "F"]
fix = true

[tool.ruff.lint]
select = ["I", "E", "F", "NPY201"]

[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["E501"]

Expand Down

0 comments on commit e1f6c32

Please sign in to comment.