Remove GenericVector.array()

Merged
#403 · Created  · Last updated

Merged pull request

Only change warning filter temporarily

706fd77·Author: ·Closed by: ·2017-10-20

Description

This pull requests removes the .array() method from vectors (in pybind11 wrappers). EigenVector gets a new (read and writable) array_view() method.

The SWIG array() method gets a deprecation warning, but will still exist for 2017.2

The majority of the changes are related to moving the demos to use .get_local() instead of .array()

Highlights of the discussions

There was consensus (ish) that get_local() is a better name

  • the same name as in C++

  • symmetry with the set_local method

  • explicit with regards to local/global data

If we are to only have one way to do this then array() must be removed

  • streamlines the wrappers with regards to C++ and not providing different ways to do the exact same thing

  • unfortunately .array() is widely used, something the unit test changes show

  • personally I am not super worried that there are multiple ways to do this (Tormod). But, if we do not merge this pull request we can consider at least merging the changes for the unit tests to use .get_local() instead of .array()

 

 

0 attachments

0 comments

Loading commits...