We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f2c584 commit 48dc80eCopy full SHA for 48dc80e
tidy3d/components/spice/sources/dc.py
@@ -78,7 +78,7 @@ def check_voltage(cls, val):
78
@pd.validator("voltage")
79
def check_repeated_voltage(cls, val):
80
"""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
+ # Normalize all zero values (both 0.0 and -0.0) to 0.0 so they are treated as duplicates
82
normalized = np.where(val == 0, 0.0, val)
83
unique_values = np.unique(normalized)
84
if len(unique_values) < len(val):
0 commit comments