Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy Compatibility #46

Open
dguittet opened this issue Jul 8, 2020 · 0 comments
Open

Numpy Compatibility #46

dguittet opened this issue Jul 8, 2020 · 0 comments

Comments

@dguittet
Copy link
Collaborator

dguittet commented Jul 8, 2020

ndarrays can sometimes be used for array inputs, but seem to cause errors when used within dictionary inputs.

For instance, from test_ResourceTools.py:

        # get a solar_resource_data dictionary
        solar = str(Path(__file__).parent / "blythe_ca_33.617773_-114.588261_psmv3_60_tmy.csv")
        data = tools.TMY_CSV_to_solar_data(solar)

        # each irradiance input is a list
        assert (data['dn'][7] == 262)

        # turning into ndarray will cause errors
        data['gh'] = np.array(data['gh'])
     
        model = pvsam.default("FlatPlatePVNone")
        model.SolarResource.solar_resource_data = data
>       model.execute()
E       TypeError: only size-1 arrays can be converted to Python scalars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant