File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ def __getattr__(cls, name):
7575 'sphinx.ext.viewcode' ,
7676 'sphinx.ext.napoleon' ,
7777 'sphinx_gallery.gen_gallery' ,
78- 'myst_parser'
78+ 'myst_parser' ,
79+ "sphinxcontrib.jquery" ,
7980]
8081
8182autosummary_generate = True
Original file line number Diff line number Diff line change @@ -93,15 +93,15 @@ def phi(alpha1):
9393 fc [0 ] += 1
9494 alpha10 = nx .from_numpy (alpha1 )
9595 fval = f (xk0 + alpha10 * pk0 , * args )
96- if type (fval ) is float :
96+ if isinstance (fval , float ) :
9797 # prevent bug from nx.to_numpy that can look for .cpu or .gpu
9898 return fval
9999 else :
100100 return nx .to_numpy (fval )
101101
102102 if old_fval is None :
103103 phi0 = phi (0. )
104- elif type (old_fval ) is float :
104+ elif isinstance (old_fval , float ) :
105105 # prevent bug from nx.to_numpy that can look for .cpu or .gpu
106106 phi0 = old_fval
107107 else :
You can’t perform that action at this time.
0 commit comments