Skip to content

Commit

Permalink
Fixed mutable default value error in kernel dataclasses
Browse files Browse the repository at this point in the history
Replaced direct assignments of kernels in VelocityKernel and HelmholtzKernel dataclasses with field(default_factory=...)
oceanmodelling example now works with python 3.11
  • Loading branch information
wejpurvis committed Feb 25, 2024
1 parent 0aa60e8 commit 027fec9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/examples/oceanmodelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from jax import config

config.update("jax_enable_x64", True)
from dataclasses import dataclass
from dataclasses import dataclass, field

from jax import hessian
from jax import config
Expand Down Expand Up @@ -195,7 +195,6 @@ def dataset_3d(pos, vel):


# %%
from dataclasses import field


@dataclass
Expand Down

0 comments on commit 027fec9

Please sign in to comment.