Skip to content

Commit 4272ca2

Browse files
committed
style: apply formatter after tabulate math test cleanup
Run repository formatting hooks after switching the tabulate math regression test to array_api_strict-backed coverage. Authored by OpenClaw (model: gpt-5.4)
1 parent aba7dc9 commit 4272ca2

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

deepmd/utils/tabulate_math.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@ def _make_data(self, xx: np.ndarray, idx: int) -> Any:
370370
matrix,
371371
xbar,
372372
self.functype,
373-
) + xp.ones((1, 1), dtype=yy.dtype, device=array_api_compat.device(yy))
373+
) + xp.ones(
374+
(1, 1), dtype=yy.dtype, device=array_api_compat.device(yy)
375+
)
374376
dy2 = unaggregated_dy2_dx_s(
375377
yy - xx,
376378
dy,
@@ -385,7 +387,9 @@ def _make_data(self, xx: np.ndarray, idx: int) -> Any:
385387
matrix,
386388
xbar,
387389
self.functype,
388-
) + xp.ones((1, 2), dtype=yy.dtype, device=array_api_compat.device(yy))
390+
) + xp.ones(
391+
(1, 2), dtype=yy.dtype, device=array_api_compat.device(yy)
392+
)
389393
dy2 = unaggregated_dy2_dx_s(
390394
yy - tt,
391395
dy,
@@ -473,9 +477,7 @@ def _layer_0(self, x: Any, w: Any, b: Any) -> Any:
473477
xp = array_api_compat.array_namespace(x, w, b)
474478
return self._activation_fn(xp.matmul(x, w) + b)
475479

476-
def _layer_1(
477-
self, x: Any, w: Any, b: Any
478-
) -> tuple[Any, Any]:
480+
def _layer_1(self, x: Any, w: Any, b: Any) -> tuple[Any, Any]:
479481
xp = array_api_compat.array_namespace(x, w, b)
480482
t = xp.concat([x, x], axis=1)
481483
return t, self._activation_fn(xp.matmul(x, w) + b) + t

0 commit comments

Comments
 (0)