问题
i have the ebook for describe runge-kutta method, and its say i need module printSoln
def printSoln(X,Y,freq):
def printHead(n):
print("\n x ",end=" ")
for i in range (n):
print(" y[",i,"] ",end=" ")
print()
def printLine(x,y,n):
print("{:13.4e}".format(x),end=" ")
for i in range (n):
print("{:13.4e}".format(y[i]),end=" ")
print()
m = len(Y)
try: n = len(Y[0])
except TypeError: n = 1
if freq == 0: freq = m
printHead(n)
for i in range(0,m,freq):
printLine(X[i],Y[i],n)
if i != m - 1: printLine(X[m - 1],Y[m - 1],n)
but when i wanna import the module, the module cant define
import numpy as np
from printSoln import *
from run_kt4 import *
import matplotlib.pyplot as plt
its say
ModuleNotFoundError: No module named 'printSoln'
how i fix this? please help
来源:https://stackoverflow.com/questions/65549998/printsoln-module-problem-modulenotfounderror