Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 26, 2023
1 parent b6099f4 commit 7b35712
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
2 changes: 0 additions & 2 deletions splinepy/bspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ def knot_insertion_matrix(
else:
matrix = np.zeros(data[1])
matrix[data[0][1][0], data[0][1][1]] = data[0][0]



data = splinepy_core.global_knot_insertion_matrix(
self.knot_vectors,
Expand Down
31 changes: 10 additions & 21 deletions tests/test_kv_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,38 +84,27 @@ def test_insert_knot_with_matrix(self):
b_spline_knots_0 = c.np.random.rand(8)
b_spline_knots_1 = c.np.random.rand(9)
matrix_bspline = self.bspline.knot_insertion_matrix(
0, b_spline_knots_0)
0, b_spline_knots_0
)
self.bspline.insert_knots(
0, b_spline_knots_0,
0,
b_spline_knots_0,
)
matrix_bspline = (
self.bspline.knot_insertion_matrix(
1, b_spline_knots_1
)
self.bspline.knot_insertion_matrix(1, b_spline_knots_1)
@ matrix_bspline
)
self.bspline.insert_knots(
1, b_spline_knots_1
)
self.bspline.insert_knots(1, b_spline_knots_1)

# NURBS Data
nurbs_knots_0 = c.np.random.rand(10)
nurbs_knots_1 = c.np.random.rand(11)
matrix_nurbs = self.nurbs.knot_insertion_matrix(
0, nurbs_knots_0
)
self.nurbs.insert_knots(
0, nurbs_knots_0
)
matrix_nurbs = self.nurbs.knot_insertion_matrix(0, nurbs_knots_0)
self.nurbs.insert_knots(0, nurbs_knots_0)
matrix_nurbs = (
self.nurbs.knot_insertion_matrix(
1, nurbs_knots_1
)
@ matrix_nurbs
)
self.nurbs.insert_knots(
1, nurbs_knots_1
self.nurbs.knot_insertion_matrix(1, nurbs_knots_1) @ matrix_nurbs
)
self.nurbs.insert_knots(1, nurbs_knots_1)

# use random query points
q2D = c.np.random.rand(50, 2)
Expand Down

0 comments on commit 7b35712

Please sign in to comment.