Skip to content

Commit a541322

Browse files
authored
Merge pull request #819 from youqingxiaozhua/dev
use isinstance() to support subclassing
2 parents 105bc68 + 6636406 commit a541322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/biotite/structure/atoms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ def coord(item):
15541554
Atom coordinates.
15551555
"""
15561556

1557-
if type(item) in (Atom, AtomArray, AtomArrayStack):
1557+
if isinstance(item, (Atom, _AtomArrayBase)):
15581558
return item.coord
15591559
elif isinstance(item, np.ndarray):
15601560
return item.astype(np.float32, copy=False)

0 commit comments

Comments
 (0)