swc.py 文件源码

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

项目:SamuROI 作者: samuroi 项目源码 文件源码
def __new__(cls, *args,**kwargs):
        # if no argument is given, create zero sized recarray
        if len(args) == 0:
            args = (0,)
        elif type(args[0]) is int:
            # create empty recarray
            d = numpy.recarray(args[0], dtype = SWCFile.swcformat)
        else:
            # create from file or filename
            d = numpy.recfromtxt(args[0], dtype = SWCFile.swcformat)

        return d.view(SWCFile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号