Skip to content

Commit

Permalink
Update doctest for ZhangLi: vector value for u is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
lang-m committed Jun 9, 2024
1 parent d86bae0 commit 4885736
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions micromagneticmodel/dynamics/zhangli.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,9 @@ class ZhangLi(DynamicsTerm):
... return np.sin(omega * t)
>>> zhangli = mm.ZhangLi(beta=0.01, u=5e6, func=sin_wave, dt=1e-13)
4. An attempt to define the Zhang-Li dynamics term using a wrong value
(here using a vector ``u`` where a scalar value is required).
4. Defining the Zhang-Li dynamics term using vector.
>>> zhangli = mm.ZhangLi(beta=-1, u=(0, 0, 1)) # vector value
Traceback (most recent call last):
...
TypeError: ...
>>> zhangli = mm.ZhangLi(beta=0.1, u=(0, 0, 1e12))
"""

Expand Down

0 comments on commit 4885736

Please sign in to comment.