From c0c422fbda68c975b34a17a54b0f38ec2810844f Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 28 Sep 2020 21:46:40 +0100 Subject: [PATCH 1/2] Fix numpy deprecation warnings --- streamtracer/streamline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/streamtracer/streamline.py b/streamtracer/streamline.py index 83383fe..af75cb8 100755 --- a/streamtracer/streamline.py +++ b/streamtracer/streamline.py @@ -220,11 +220,11 @@ def trace(self, seeds, grid, direction=0): seeds, field, grid_spacing, -1, self.max_steps, cyclic) # Reduce the size of the arrays, and flip the reverse streamlines - xs_f = np.array([xi[:ni, :] for xi, ni in zip(xs_f, ns_f)]) - xs_r = np.array([xi[ni - 1:0:-1, :] for xi, ni in zip(xs_r, ns_r)]) + xs_f = [xi[:ni, :] for xi, ni in zip(xs_f, ns_f)] + xs_r = [xi[ni - 1:0:-1, :] for xi, ni in zip(xs_r, ns_r)] # Stack the forward and reverse arrays - self.xs = np.array([np.vstack([xri, xfi]) for xri, xfi in zip(xs_r, xs_f)]) + self.xs = [np.vstack([xri, xfi]) for xri, xfi in zip(xs_r, xs_f)] self.n_lines = np.fromiter([len(xsi) for xsi in self.xs], int) self.ROT = np.vstack([ROT_f, ROT_r]).T From f7e958e8889295e9737f35e8b7d19c56a7692b7b Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 28 Sep 2020 21:53:18 +0100 Subject: [PATCH 2/2] Fix pipelines --- azure-pipelines.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 40487a1..d593a1d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,18 +15,18 @@ strategy: #Python37_windows: # python.version: '3.7' # vmImage: 'vs2017-win2016' - py36_linux: - python.version: '3.6' - vmImage: 'ubuntu-latest' py37_linux: python.version: '3.7' vmImage: 'ubuntu-latest' - py36_macOS: - vmImage: 'xcode9-macOS10.13' - python.version: '3.6' + py38_linux: + python.version: '3.8' + vmImage: 'ubuntu-latest' py37_macOS: - vmImage: 'xcode9-macOS10.13' + vmImage: 'macOS-latest' python.version: '3.7' + py38_macOS: + vmImage: 'macOS-latest' + python.version: '3.8' pool: vmImage: '$(vmImage)'