8000 ValueError: spa.py · Issue #671 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content
ValueError: spa.py #671
Closed
Closed
@BlevinsGagarin

Description

@BlevinsGagarin

While profiling a script, which uses pvlib, I got a ValueError in spa.py -> line 259 .. 270

I found a StackOverFlow topic, that fixed the problem: "You cannot resize NumPy arrays that share data with another array in-place using the resize method by default. Instead, you can create a new resized array using the np.resize function:"

I changed the lines 259 .. 270 to

np.resize(TABLE_1_DICT['L1'], (64, 3))
np.resize(TABLE_1_DICT['L2'], (64, 3))
np.resize(TABLE_1_DICT['L3'], (64, 3))
np.resize(TABLE_1_DICT['L4'], (64, 3))
np.resize(TABLE_1_DICT['L5'], (64, 3))

np.resize(TABLE_1_DICT['B1'], (64, 3))

np.resize(TABLE_1_DICT['R1'], (64, 3))
np.resize(TABLE_1_DICT['R2'], (64, 3))
np.resize(TABLE_1_DICT['R3'], (64, 3))
np.resize(TABLE_1_DICT['R4'], (64, 3))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0