Skip to content

Commit e2653de

Browse files
committed
Typing.
1 parent 687eee2 commit e2653de

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ exclude = ["tests/*"]
6464
[tool.mypy]
6565

6666
disable_error_code = ["no-redef", "valid-type"]
67-
exclude = ["tests", "build", "docs"]
67+
exclude = ["tests", "build", "docs", "dist"]

scinum/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def uncertainties(
488488
v = float(v)
489489
# convert to array when nominal is in array
490490
if self.is_numpy:
491-
v *= np.ones(self.shape, dtype=self.dtype) # type: ignore[arg-type]
491+
v *= np.ones(self.shape, dtype=self.dtype) # type: ignore[arg-type,type-var,operator] # noqa
492492
elif is_numpy(v):
493493
# check the shape
494494
if v.shape != self.shape:
@@ -2303,7 +2303,7 @@ def match_precision(val: float | NDArray, ref: str | float | NDArray, **kwargs)
23032303
_match_precision(float(v), float(r), **kwargs)
23042304
for v, r in np.nditer([val, ref])
23052305
]
2306-
ret = np.chararray(len(strings), itemsize=max(len(s) for s in strings))
2306+
ret = np.empty(len(strings), dtype=f"|S{max(len(s) for s in strings)}")
23072307
ret[:] = strings
23082308
ret = ret.reshape(val.shape) # type: ignore[assignment, union-attr]
23092309

0 commit comments

Comments
 (0)