Skip to content

Consider using shapely 2.0's vectorized geometry operations #44

Open
@kandersolar

Description

@kandersolar

Right now shading.shaded_fraction is limited to scalar solar position inputs. TrackerField allows array inputs, but uses a python loop to process each element individually. I assume the decision to limit shading.shaded_fraction to scalar inputs was at least in part because shapely's geometry operations were not vectorized.

However, it seems that one of the changes introduced in shapely 2.0 is that geometry operations are now vectorized and allegedly significantly faster than looping like we currently do (see https://shapely.readthedocs.io/en/stable/release/2.x.html#vectorized-element-wise-geometry-operations). @AdamRJensen if you have some time, it may be worth looking into using this new vectorized functionality.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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