From 4663c1f9a44a2ea89f28795d2775e6b607174a09 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:54:51 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/line.py | 46 +++++++++++++++++++++++----------------------- tests/test_line.py | 13 ++++++++----- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/examples/line.py b/examples/line.py index d7e02069..efbfb1c1 100644 --- a/examples/line.py +++ b/examples/line.py @@ -1,6 +1,7 @@ import numpy as np import vedo -vedo.settings.default_backend= 'vtk' + +vedo.settings.default_backend = "vtk" from brainrender import Scene from brainrender.actors import Points, Line @@ -12,32 +13,31 @@ scene.add_brain_region(688, alpha=0.2, color="green") # Add two points identifying the positions of two cortical neurons. -point_coordinates = np.array([ - [4575, 5050, 9750], - [4275, 2775, 6100] -]) +point_coordinates = np.array([[4575, 5050, 9750], [4275, 2775, 6100]]) scene.add(Points(point_coordinates, radius=100, colors="blue")) # Display the shortest path within cortex boundaries between the two points. -path_coordinates = np.array([ - [4575, 5050, 9750], - [4575, 4800, 9500], - [4575, 4550, 9250], - [4575, 4300, 9000], - [4575, 4050, 8750], - [4350, 3800, 8500], - [4225, 3550, 8250], - [4200, 3300, 8000], - [4200, 3100, 7750], - [4200, 2950, 7500], - [4200, 2800, 7250], - [4200, 2700, 7000], - [4200, 2650, 6750], - [4200, 2650, 6500], - [4200, 2650, 6250], - [4275, 2775, 6100], -]) +path_coordinates = np.array( + [ + [4575, 5050, 9750], + [4575, 4800, 9500], + [4575, 4550, 9250], + [4575, 4300, 9000], + [4575, 4050, 8750], + [4350, 3800, 8500], + [4225, 3550, 8250], + [4200, 3300, 8000], + [4200, 3100, 7750], + [4200, 2950, 7500], + [4200, 2800, 7250], + [4200, 2700, 7000], + [4200, 2650, 6750], + [4200, 2650, 6500], + [4200, 2650, 6250], + [4275, 2775, 6100], + ] +) scene.add(Line(path_coordinates, linewidth=3, color="black")) diff --git a/tests/test_line.py b/tests/test_line.py index e6738842..f6aab799 100644 --- a/tests/test_line.py +++ b/tests/test_line.py @@ -4,15 +4,18 @@ from brainrender.actor import Actor from brainrender.actors import Line + def test_line(): s = Scene() line = Line( - np.array([ - [0, 0, 0], - [1, 1, 1], - [2, 2, 2], - ]) + np.array( + [ + [0, 0, 0], + [1, 1, 1], + [2, 2, 2], + ] + ) ) s.add(line)