invrs-opt 0.7.1__py3-none-any.whl → 0.7.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invrs_opt/__init__.py +1 -1
- invrs_opt/parameterization/gaussian_levelset.py +9 -5
- {invrs_opt-0.7.1.dist-info → invrs_opt-0.7.2.dist-info}/METADATA +2 -2
- {invrs_opt-0.7.1.dist-info → invrs_opt-0.7.2.dist-info}/RECORD +7 -7
- {invrs_opt-0.7.1.dist-info → invrs_opt-0.7.2.dist-info}/LICENSE +0 -0
- {invrs_opt-0.7.1.dist-info → invrs_opt-0.7.2.dist-info}/WHEEL +0 -0
- {invrs_opt-0.7.1.dist-info → invrs_opt-0.7.2.dist-info}/top_level.txt +0 -0
invrs_opt/__init__.py
CHANGED
@@ -438,19 +438,23 @@ def _fixed_pixel_constraint(
|
|
438
438
|
array = _to_array(params, mask_gradient=mask_gradient, pad_pixels=pad_pixels)
|
439
439
|
|
440
440
|
example_density = params.example_density()
|
441
|
-
fixed_solid = jnp.zeros(example_density.shape, dtype=bool)
|
442
|
-
fixed_void = jnp.zeros(example_density.shape, dtype=bool)
|
441
|
+
fixed_solid = jnp.zeros(example_density.shape[-2:], dtype=bool)
|
442
|
+
fixed_void = jnp.zeros(example_density.shape[-2:], dtype=bool)
|
443
443
|
if example_density.fixed_solid is not None:
|
444
444
|
fixed_solid = jnp.asarray(example_density.fixed_solid)
|
445
445
|
if example_density.fixed_void is not None:
|
446
446
|
fixed_void = jnp.asarray(example_density.fixed_void)
|
447
447
|
|
448
|
-
|
448
|
+
pad_width_solid = ((0, 0),) * (fixed_solid.ndim - 2) + (
|
449
449
|
(pad_pixels, pad_pixels),
|
450
450
|
(pad_pixels, pad_pixels),
|
451
451
|
)
|
452
|
-
|
453
|
-
|
452
|
+
pad_width_void = ((0, 0),) * (fixed_void.ndim - 2) + (
|
453
|
+
(pad_pixels, pad_pixels),
|
454
|
+
(pad_pixels, pad_pixels),
|
455
|
+
)
|
456
|
+
fixed_solid = jnp.pad(fixed_solid, pad_width_solid, mode="edge")
|
457
|
+
fixed_void = jnp.pad(fixed_void, pad_width_void, mode="edge")
|
454
458
|
fixed = fixed_solid | fixed_void
|
455
459
|
target = jnp.where(fixed_solid, 1, 0)
|
456
460
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: invrs_opt
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.2
|
4
4
|
Summary: Algorithms for inverse design
|
5
5
|
Author-email: "Martin F. Schubert" <mfschubert@gmail.com>
|
6
6
|
Maintainer-email: "Martin F. Schubert" <mfschubert@gmail.com>
|
@@ -533,7 +533,7 @@ Requires-Dist: pytest-cov; extra == "tests"
|
|
533
533
|
Requires-Dist: pytest-subtests; extra == "tests"
|
534
534
|
|
535
535
|
# invrs-opt - Optimization algorithms for inverse design
|
536
|
-
`v0.7.
|
536
|
+
`v0.7.2`
|
537
537
|
|
538
538
|
## Overview
|
539
539
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
invrs_opt/__init__.py,sha256=
|
1
|
+
invrs_opt/__init__.py,sha256=_hiwGthyPapJUx8-nP7JrJYEFX3mJYTsdUh_X0MyhEQ,585
|
2
2
|
invrs_opt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
invrs_opt/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
invrs_opt/experimental/client.py,sha256=t4XxnditYbM9DWZeyBPj0Sa2acvkikT0ybhUdmH2r-Y,4852
|
@@ -10,11 +10,11 @@ invrs_opt/optimizers/wrapped_optax.py,sha256=L836gwzWbwxPNWh8Y7PSgFHV4PZluSklnbh
|
|
10
10
|
invrs_opt/parameterization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
invrs_opt/parameterization/base.py,sha256=QTnhOfMYbDchZOFzk9graryMd6rYHlyd7E2T1TtucB8,3570
|
12
12
|
invrs_opt/parameterization/filter_project.py,sha256=XCPqQ2ECv7DDTLRtVGJePfnjKYB2XndI6DssSr-4MZw,3239
|
13
|
-
invrs_opt/parameterization/gaussian_levelset.py,sha256=
|
13
|
+
invrs_opt/parameterization/gaussian_levelset.py,sha256=IGdQl3XMEHYNxNPSoKmUD7ZJu_fImIZTqqqmvilfmag,24998
|
14
14
|
invrs_opt/parameterization/pixel.py,sha256=4qCYDUCcFPr8W94whX5YFllrXgyZbPBVIJBf8m_Dv4k,1173
|
15
15
|
invrs_opt/parameterization/transforms.py,sha256=8GzaIsUuuXvMCLiqAEEfxmi9qE9KqHzbuTj_m0GjH3w,8216
|
16
|
-
invrs_opt-0.7.
|
17
|
-
invrs_opt-0.7.
|
18
|
-
invrs_opt-0.7.
|
19
|
-
invrs_opt-0.7.
|
20
|
-
invrs_opt-0.7.
|
16
|
+
invrs_opt-0.7.2.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
17
|
+
invrs_opt-0.7.2.dist-info/METADATA,sha256=jx_MxaNkrJRUBRubRlDIytDRznP_1P9sWRHrqihaKi8,32633
|
18
|
+
invrs_opt-0.7.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
19
|
+
invrs_opt-0.7.2.dist-info/top_level.txt,sha256=hOziS2uJ_NgwaW9yhtOfeuYnm1X7vobPBcp_6eVWKfM,10
|
20
|
+
invrs_opt-0.7.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|