__init__.py 文件源码

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

项目:heliopy 作者: heliopython 项目源码 文件源码
def create_array(self):
        """Creates a numpy array to hold the data from this slice

        Returns
        =======
        out : numpy.array
            array sized, typed, and dimensioned to hold data from
            this slice
        """
        counts = self.counts
        degen = self.degen
        if self.column:
            counts = self.reorder(counts)
            degen = self.reorder(degen)
        #TODO: Forcing C order for now, revert to using self.column later
        array = numpy.empty(
            [counts[i] for i in range(len(counts)) if not degen[i]],
            self.zvar._np_type(), order='C')
        return numpy.require(array, requirements=('C', 'A', 'W'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号