aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-10-08 22:39:52 +0300
committerBonfaceKilz2020-10-09 01:05:42 +0300
commitdca0dab44a40faecd39ad7a176674fd4389b1903 (patch)
tree1db27a3dab0460445e8f5974eb54d0f35fb2c1c3
parent65846e5b05841b7c31a37298b49b99bb77d48a31 (diff)
downloadgenenetwork2-dca0dab44a40faecd39ad7a176674fd4389b1903.tar.gz
Use built-in array as a named import
* wqflask/wqflask/wgcna/wgcna_analysis.py (WGCNA.render_image): Use named import method. This is a workaround for using explicitly using "array" which conflicts with something else in the namespace.
-rw-r--r--wqflask/wqflask/wgcna/wgcna_analysis.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/wgcna/wgcna_analysis.py b/wqflask/wqflask/wgcna/wgcna_analysis.py
index 35fb3ec0..93742daf 100644
--- a/wqflask/wqflask/wgcna/wgcna_analysis.py
+++ b/wqflask/wqflask/wgcna/wgcna_analysis.py
@@ -4,8 +4,8 @@ import base64
import sys
import rpy2.robjects as ro # R Objects
import rpy2.rinterface as ri
-import array
+from array import array as arr
from numpy import *
from base.webqtlConfig import GENERATED_IMAGE_DIR
from rpy2.robjects.packages import importr
@@ -164,8 +164,8 @@ class WGCNA(object):
print(("pre-loading imgage results:", self.results['imgloc']))
imgfile = open(self.results['imgloc'], 'rb')
imgdata = imgfile.read()
- bytesarray = array.array('B', imgB64)
imgB64 = base64.b64encode(imgdata)
+ bytesarray = arr('B', imgB64)
self.results['imgdata'] = bytesarray
def process_results(self, results):