Skip to content

Commit

Permalink
Merge pull request #81 from padix-key/master
Browse files Browse the repository at this point in the history
Fixed dir() function and coord initialization for AtomArray and AtomArrayStack
  • Loading branch information
padix-key authored Feb 14, 2019
2 parents 9c87ebd + cc5f542 commit 8f6b0db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/biotite/structure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
An `Atom` contains data for a single atom, it stores the annotations as
scalar values and the coordinates as length 3 `ndarray`.
An `AtomArray` stores data for an entire structure model containing *n*
atoms. Therefore the annotations are represented as `ndarray`s of
atoms. Therefore the annotations are represented as `ndarray` objects of
length *n*, so called annotation arrays. The coordinates are a (n x 3)
`ndarray`.
`AtomArrayStack` stores data for *m* models. Each `AtomArray` in
Expand Down
4 changes: 3 additions & 1 deletion src/biotite/structure/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ def __dir__(self):
attr = super().__dir__()
attr.append("coord")
attr.append("bonds")
attr.append("box")
for name in self._annot.keys():
attr.append(name)
return attr

def __eq__(self, item):
"""
Expand Down Expand Up @@ -819,7 +821,7 @@ def __init__(self, depth, length):
if depth == None or length == None:
self._coord = None
else:
self._coord = np.zeros((depth, length, 3), dtype=float)
self._coord = np.full((depth, length, 3), np.nan, dtype=float)

def get_array(self, index):
"""
Expand Down

0 comments on commit 8f6b0db

Please sign in to comment.