Skip to content

Commit bd97bf8

Browse files
committed
Minor
1 parent 273022c commit bd97bf8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tiledb/datatypes.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ def from_numpy(cls, dtype: np.dtype) -> DataType:
2424
if dtype == "blob":
2525
return cls(np.dtype("S"), lt.DataType.BLOB, 1)
2626

27-
if hasattr(lt.DataType, "GEOM_WKB"):
28-
if dtype == "wkb":
29-
return cls(np.dtype("S"), lt.DataType.GEOM_WKB, 1)
27+
if hasattr(lt.DataType, "GEOM_WKB") and dtype == "wkb":
28+
return cls(np.dtype("S"), lt.DataType.GEOM_WKB, 1)
3029

31-
if hasattr(lt.DataType, "GEOM_WKT"):
32-
if dtype == "wkt":
33-
return cls(np.dtype("S"), lt.DataType.GEOM_WKT, 1)
30+
if hasattr(lt.DataType, "GEOM_WKT") and dtype == "wkt":
31+
return cls(np.dtype("S"), lt.DataType.GEOM_WKT, 1)
3432

3533
dtype = np.dtype(dtype)
3634
if dtype.kind == "V":

0 commit comments

Comments
 (0)