Skip to content

Add compatibility to numpy 1.16.1 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Adaptation.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Developed with support from the EC FP7/2007-2013: ARCH, Project n. 224

from numpy.lib.function_base import linspace
from numpy import linspace

class Adaptation(object):
"""
Expand Down Expand Up @@ -190,4 +190,4 @@ def Adapt(self, day):
preRun = True
if day == -1:
preRun = False
return preRun
return preRun
16 changes: 5 additions & 11 deletions Elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,25 +426,19 @@ def InputParameters(self, evaluator=None):

#Wall-Thickness
if type(self.WallThickness) is not str:
len_wall_thickness = len(self.WallThickness)-1
idx_st = int(len_wall_thickness * s1)
idx_end = int(len_wall_thickness * s2)
h1 = (self.WallThickness[s2] - self.WallThickness[s1])/self.Length
h2 = self.WallThickness[s1]

h1 = (self.WallThickness[idx_end] - self.WallThickness[idx_st])/self.Length
h2 = self.WallThickness[idx_st]
h_z = h2+(h1*z)
self.WallThickness = h_z
else:
evaluator.SetAbscissa(self.s1+((self.s2-self.s1)/2))
evaluator.Evaluate(self.WallThickness)

#Young's Modulus
len_young_modulus = len(self.YoungModulus)-1
idx_st = int(len_young_modulus * s1) if type(self.YoungModulus) != dict else s1
idx_end = int(len_young_modulus * s2) if type(self.YoungModulus) != dict else s2
E1 = (self.YoungModulus[s2] - self.YoungModulus[s1])/self.Length
E2 = self.YoungModulus[s1]

E1 = (self.YoungModulus[idx_end] - self.YoungModulus[idx_st])/self.Length
E2 = self.YoungModulus[idx_st]
E_z = E2+(E1*z)
self.YoungModulus = E_z

Expand Down Expand Up @@ -1421,4 +1415,4 @@ class Error(Exception):
'''
A base class for exceptions defined in this module.
'''
pass
pass
4 changes: 2 additions & 2 deletions InverseWomersley.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from numpy.core.fromnumeric import mean
from numpy.lib.scimath import sqrt
from numpy.ma.core import exp
from numpy.lib.function_base import linspace
from numpy import linspace


def add_bessel(name):
Expand Down Expand Up @@ -554,4 +554,4 @@ def PlotWss(self, meshid, imagpath):
savefig(imagpath+str(meshid)+'_'+str(self.Name)+'_wss.png')
print "Wss, MeshId", meshid, self.Name, "=", str(round(max(self.Tauplot),1)), "$dyne/cm^2$"
close()
return (round(max(self.Tauplot),1))
return (round(max(self.Tauplot),1))
2 changes: 1 addition & 1 deletion NetworkSolutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from numpy.core.fromnumeric import mean
from numpy.core.numeric import array, zeros
from math import pi
from numpy.lib.function_base import linspace
from numpy import linspace
from numpy.core.numeric import arange
from numpy.lib.scimath import sqrt
from numpy.ma.core import ceil
Expand Down