为了账号安全,请及时绑定邮箱和手机立即绑定

在线编程从哪里进去啊,对于python支持例如numpy这样的包吗 ,还是得自己import啊

在线编程从哪里进去啊,对于python支持例如numpy这样的包吗 ,还是得自己import啊

jc小金金 2015-06-16 19:22:33
#在线编程从哪里进去啊,对于python支持例如numpy这样的包吗 ,还是得自己import啊#如题,如题,找不到入口诶,请问这个在线编程支持诸如python的统计画图吗,比如这段代码import sysimport numpy as npimport matplotlib.pyplot as pltdef get_data():    # example data    mu = 100 # mean of distribution    sigma = 15 # standard deviation of distribution    x = mu + sigma * np.random.randn(10000)    return x#you can write your code here#def draw(IMG_PATH):#get input datadef draw():    x = get_data()    print 'data is : '+str(x)    # the histogram of the data    plt.hist(x, bins=50, color='g', alpha=0.5)    #show image    plt.show()    print 'i excute it'   # plt.savefig(IMG_PATH)#the code should not be changed"""if __name__ == '__main__':    if len(sys.argv)==1:        print 'error'    else:         #the path of image to show        IMG_PATH = sys.argv[1]+'fig.jpg'        draw(IMG_PATH)"""draw()
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 2383 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信