From dca0dab44a40faecd39ad7a176674fd4389b1903 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 8 Oct 2020 22:39:52 +0300 Subject: 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. --- wqflask/wqflask/wgcna/wgcna_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') 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): -- cgit v1.2.3