2023-11-07 03:38:46 +08:00

7 lines
503 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import numpy as np # 导入numpy库用来存储和处理大型矩阵比python自带的嵌套列表更高效。numpy库还包含了许多数学函数库。python+numpy等同于matlab。
def main(): # 主函数的内容放在这里。
pass
if __name__ == '__main__': # 如果是当前文件直接运行执行main()函数中的内容如果是import当前文件则不执行。同时将main()语句放在最后运行,可以避免书写的函数出现未定义的情况。
main()