Mesh Generation for Computational Science in Python

后端 未结 3 1640
半阙折子戏
半阙折子戏 2021-01-02 09:38

I have a need for a Python module/package that provides a mesh on which I can do computational science? I am not doing graphics, so I don\'t think the blender package is wha

3条回答
  •  囚心锁ツ
    2021-01-02 10:03

    I recommend using NumPy (especially if you've used MATLAB before). Many computational scientists / mechanical engineers working in python might agree, but I'm biased as it found it's way into much of the last year of my research. It's part of SciPy: http://numpy.scipy.org/ I was fond of numpy.linspace(a,b,N) which makes an N length vector of equally spaced values from a to b. You can use numpy.ndarray to make a N x M matrix, or if you want 2D arrays use numpy.meshgrid.

提交回复
热议问题