amusecode / amuse

Astrophysical Multipurpose Software Environment. This is the main repository for AMUSE
http://www.amusecode.org
Apache License 2.0
155 stars 98 forks source link

TypeError: 'numpy.float64' object cannot be interpreted as an index #158

Closed tianzhijia closed 7 years ago

tianzhijia commented 7 years ago
binaries, stars = generate_initial_population_grid(
        0.5 | units.MSun, 1.5 | units.MSun, 3, #mass range
        0.9, 0.9, 1,                           #mass ratios range
        10 | units.RSun, 100 | units.RSun, 120,    #semi major axis range
        0.0 , 1.0, 120                          #eccentricity range
    )

... Traceback (most recent call last): File "", line 5, in File "binary_population_synthesis.py", line 110, in generate_initial_population_grid grid = multidimensional_meshgrid(primary_masses, mass_ratios, separations, eccentricities) File "binary_population_synthesis.py", line 42, in multidimensional_meshgrid array = array.reshape(shape) TypeError: 'numpy.float64'

code from binary_population_synthesis.py error about numpy appears when running generate_initial_population_grid, Anyone who knows how to fix it? Thx

FYI. Install amuse on Mac os X 10.11 following [http://www.amusecode.org/doc/install/install-prerequisites-osx.html]

rieder commented 7 years ago

Fixed.