Skip to content

Commit

Permalink
fix error in flatten protVec
Browse files Browse the repository at this point in the history
  • Loading branch information
anazhmetdin committed Dec 9, 2020
1 parent f3a1a20 commit 2dbca6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion protencoder/protVec.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import biovec
import random
import numpy as np
from protencoder.protencoder import encoder


Expand Down Expand Up @@ -38,7 +39,10 @@ def encode(self):
seq.replace("O", "k")
encoded = self.pv.to_vecs(seq)
if self.flatten:
encoded = encoded.flatten()
a = np.array([])
for i in encoded:
a = np.concatenate((a, i), axis=None)
encoded = a
self.handler.seqDict[prot] = encoded

def read(self, seqPath):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/anegm98/protencoder',
version='1.4.3',
version='1.4.4',
zip_safe=False,
package_data={'protencoder': ['data/*']}
)

0 comments on commit 2dbca6f

Please # to comment.