Skip to content

Commit

Permalink
Fix test and mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
mfschubert committed Nov 17, 2023
1 parent 36319e8 commit 7fb8020
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/invrs_gym/challenges/sorter/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ def response(

spec = dataclasses.replace(
self.spec,
thickness_cap=jnp.asarray(params[THICKNESS_CAP].array),
thickness_metasurface=jnp.asarray(params[THICKNESS_METASURFACE].array),
thickness_spacer=jnp.asarray(params[THICKNESS_SPACER].array),
thickness_cap=params[THICKNESS_CAP], # type: ignore[arg-type]
thickness_metasurface=params[THICKNESS_METASURFACE], # type: ignore[arg-type]
thickness_spacer=params[THICKNESS_SPACER], # type: ignore[arg-type]
)
return simulate_sorter(
density=params[DENSITY_METASURFACE], # type: ignore[arg-type]
Expand Down Expand Up @@ -375,9 +375,9 @@ def simulate_sorter(

layer_thicknesses = [
jnp.zeros(()), # Ambient
jnp.asarray(spec.thickness_cap),
jnp.asarray(spec.thickness_metasurface),
jnp.asarray(spec.thickness_spacer),
spec.thickness_cap.array,
spec.thickness_metasurface.array,
spec.thickness_spacer.array,
jnp.asarray(spec.offset_monitor_substrate), # Substrate
]

Expand Down
8 changes: 4 additions & 4 deletions tests/challenges/sorter/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def test_density_has_expected_properties(self, minimum_width, minimum_spacing):
self.assertEqual(
set(params.keys()),
{
"metasurface_density",
"metasurface_thickness",
"cap_thickness",
"spacer_thickness",
"density_metasurface",
"thickness_metasurface",
"thickness_cap",
"thickness_spacer",
},
)

Expand Down

0 comments on commit 7fb8020

Please sign in to comment.