Skip to content

Commit 48dc80e

Browse files
marc-flexCopilot
andauthored
copilot comment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3f2c584 commit 48dc80e

File tree

1 file changed

+1
-1
lines changed
  • tidy3d/components/spice/sources

1 file changed

+1
-1
lines changed

tidy3d/components/spice/sources/dc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def check_voltage(cls, val):
7878
@pd.validator("voltage")
7979
def check_repeated_voltage(cls, val):
8080
"""Warn if repeated voltage values are present, treating 0 and -0 as the same value."""
81-
# Replace -0.0 with 0.0 to ensure they are treated as duplicates
81+
# Normalize all zero values (both 0.0 and -0.0) to 0.0 so they are treated as duplicates
8282
normalized = np.where(val == 0, 0.0, val)
8383
unique_values = np.unique(normalized)
8484
if len(unique_values) < len(val):

0 commit comments

Comments
 (0)