Skip to content

creating line2d instances with numpy arrays of coordinates - problems #736

@jmfloyd

Description

@jmfloyd

I was creating a number of lines, using a dummy array that I kept changing the coordinate values in. This results in all lines effectively having the same coordinates (as the last line created) if queried with pick or other means, even though they plot up properly (not sure why). If I do the line construct with a numpy copy(), it works properly. Obviously a numpy reference is stored in the instance, of course that reference does not change though the values in the numpy data does. Hence the behaviour. No errors reported.

Change the coords to lists - all works.

Possible fix - test for array and do a copy or create a list from it. Need to ensure a reference to the original is not kept,as it may keep changing.

Can provide a short code example.

Using V1.1.0

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy