davidcortesortuno / oommfpy

Python library to analyse OOMMF and MuMax3 data files
BSD 2-Clause "Simplified" License
12 stars 7 forks source link

problem with convert files omf to vtk #2

Closed ghost closed 4 years ago

ghost commented 4 years ago

I have tried converting omf files to vtk, but i have the following error: File "d:\anaconda\envs\oommf\lib\runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "d:\anaconda\envs\oommf\lib\runpy.py", line 72, in _run_code exec code in run_globals File "d:\anaconda\envs\oommf\lib\site-packages\click\core.py", line 956, in invoke return ctx.invoke(self.callback, *ctx.params) File "d:\anaconda\envs\oommf\lib\site-packages\click\core.py", line 555, in invoke return callback(args, **kwargs) File "d:\anaconda\envs\oommf\lib\site-packages\oommfpy\tools\omf2vtk.py", line 52, in omf2vtk_cli omf2vtk(input_omf_file, output_vtk_file, output_format=output_format) File "d:\anaconda\envs\oommf\lib\site-packages\oommfpy\tools\omf2vtk.py", line 20, in omf2vtk data.generate_coordinates() File "d:\anaconda\envs\oommf\lib\site-packages\oommfpy\oommfpy.py", line 231, in generate_coordinates xs = np.tile(np.tile(xs, self.ny), self.nz) File "d:\anaconda\envs\oommf\lib\site-packages\numpy\lib\shape_base.py", line 1243, in tile return c.reshape(shape_out) TypeError: 'float' object cannot be interpreted as an index

I am currently using anaconda with Python 2.7, I have installed the following libraries:

numpy 1.16 matplotlib 2.2.3 pyvtk 0.5.18 click 7.0 scipy 1.2.1

Do you know what I could have done wrong?. This is compatible with Windows?

for install i have used pip install ./

davidcortesortuno commented 4 years ago

Hi, Python 2.7 is too old now. Can you try with Python 3.x ?

ghost commented 4 years ago

Thanks, with python 3.6 work