| |
@@ -0,0 +1,62 @@
|
| |
+ From 8728c2e2ff673bd7c1715ee2f052949d63defdd6 Mon Sep 17 00:00:00 2001
|
| |
+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
| |
+ Date: Wed, 23 Mar 2022 07:23:42 -0400
|
| |
+ Subject: [PATCH] =?UTF-8?q?Adjust=20examples=20to=20use=20to=5F3d(axes=3D?=
|
| |
+ =?UTF-8?q?=E2=80=A6)?=
|
| |
+ MIME-Version: 1.0
|
| |
+ Content-Type: text/plain; charset=UTF-8
|
| |
+ Content-Transfer-Encoding: 8bit
|
| |
+
|
| |
+ API changed in d2cd928. Fixes:
|
| |
+
|
| |
+ TypeError: to_3d() got an unexpected keyword argument 'plane'
|
| |
+
|
| |
+ when running the examples.
|
| |
+ ---
|
| |
+ examples/ex_01_generate_probe_from_sratch.py | 4 ++--
|
| |
+ examples/ex_02_probe_2d_probe_3d.py | 6 +++---
|
| |
+ 2 files changed, 5 insertions(+), 5 deletions(-)
|
| |
+
|
| |
+ diff --git a/examples/ex_01_generate_probe_from_sratch.py b/examples/ex_01_generate_probe_from_sratch.py
|
| |
+ index e26947f..e979285 100644
|
| |
+ --- a/examples/ex_01_generate_probe_from_sratch.py
|
| |
+ +++ b/examples/ex_01_generate_probe_from_sratch.py
|
| |
+ @@ -60,10 +60,10 @@
|
| |
+ plot_probe(probe)
|
| |
+
|
| |
+ ##############################################################################
|
| |
+ -# A 2d `Probe` can be transformed to a 3d `Probe` by indicating the `plane`
|
| |
+ +# A 2d `Probe` can be transformed to a 3d `Probe` by indicating the `axes`
|
| |
+ # on which contacts will lie (Here the 'y' coordinate will be 0 for all contacts):
|
| |
+
|
| |
+ -probe_3d = probe.to_3d(plane='xz')
|
| |
+ +probe_3d = probe.to_3d(axes='xz')
|
| |
+ plot_probe(probe_3d)
|
| |
+
|
| |
+ plt.show()
|
| |
+ diff --git a/examples/ex_02_probe_2d_probe_3d.py b/examples/ex_02_probe_2d_probe_3d.py
|
| |
+ index 2755872..a3efd55 100644
|
| |
+ --- a/examples/ex_02_probe_2d_probe_3d.py
|
| |
+ +++ b/examples/ex_02_probe_2d_probe_3d.py
|
| |
+ @@ -33,10 +33,10 @@
|
| |
+ ##############################################################################
|
| |
+ # Let's transform it into a 3d probe.
|
| |
+ #
|
| |
+ -# Here the plane is 'xz' so y will be 0 for all contacts.
|
| |
+ +# Here the axes are 'xz' so y will be 0 for all contacts.
|
| |
+ # The shape of probe_3d.contact_positions is now (n_elec, 3)
|
| |
+
|
| |
+ -probe_3d = probe_2d.to_3d(plane='xz')
|
| |
+ +probe_3d = probe_2d.to_3d(axes='xz')
|
| |
+ print(probe_2d.contact_positions.shape)
|
| |
+ print(probe_3d.contact_positions.shape)
|
| |
+
|
| |
+ @@ -55,7 +55,7 @@
|
| |
+ # We can create another probe lying on another plane:
|
| |
+
|
| |
+
|
| |
+ -other_3d = probe_2d.to_3d(plane='yz')
|
| |
+ +other_3d = probe_2d.to_3d(axes='yz')
|
| |
+ plot_probe(other_3d)
|
| |
+
|
| |
+ ##############################################################################
|
| |
This breaks the API by renaming:
probeinterface.probe.select_dimensions
toprobeinterface.probe.select_axes
plane
keyword argument ofprobeinterface.probe.to_3d
toaxes
dimensions
keyword argument ofprobeinterface.probe.to_3d
toaxes
The only dependent package,
python-neo
, does not use the affected parts of the API.