_base.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:biclustlib 作者: padilha 项目源码 文件源码
def run(self, data):
        """Compute biclustering.

        Parameters
        ----------
        data : numpy.ndarray
        """
        data = check_array(data, dtype=self._data_type, copy=True)

        self._validate_parameters()

        if self.__sleep:
            sleep(1)

        # some executables require the number of rows and columns of the dataset as an input argument
        self._num_rows, self._num_cols = data.shape

        # creating temp dir to store the executable's inputs and outputs
        os.mkdir(self.__tmp_dir)

        self._write_data(data)
        os.system(self.__exec_comm.format(**self.__dict__))
        biclustering = self._parse_output()

        # removing temp dir
        shutil.rmtree(self.__tmp_dir)

        return biclustering
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号