我的代码运行良好,然后我再次运行它,代码在atom中运行完毕,但图像不会弹出。所以我尝试了spyder和jupyter,但都得到了错误消息“kernel dead,restarting”。我尝试了其他问题中提到的一些方法,但都没有奏效。我更新了水蟒导航器。一般来说,我对计算机没有太多的经验,我不确定下一步是什么。我运行的是python3.6。非常感谢任何帮助,谢谢。在
编辑:添加代码
编辑2:解决了,我的代码错了(当然),不是python:D#CIE4365-16
#Assignment 1 - Heat flow
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as spin
from collections import namedtuple
#grid/discretization
def topTbound(t, bPar):
'''Temperature for top boundary, where t is time'''
boundT = bPar.avgT - bPar.rangeT * np.cos(2 * np.pi * (t - bPar.tmin) / 365.25)
return boundT
def heatflux(t, T, sPar, mDim, bPar):
boundT = topTbound(t, bPar) #temperature for top boundary funtion
locT = T.copy() #copies T, doe