File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -268,28 +268,6 @@ def make_sym_vector(name: str, components: int) -> Matrix:
268268 return Matrix ([Symbol (f"{ name } { i } " ) for i in range (components )])
269269
270270
271- def vector_xreplace (expr : Expr , from_vec : Matrix , to_vec : Matrix ) -> Expr :
272- substs = {}
273- assert (from_vec .rows , from_vec .cols ) == (to_vec .rows , to_vec .cols )
274- for irow in range (from_vec .rows ):
275- for icol in range (from_vec .cols ):
276- substs [from_vec [irow , icol ]] = to_vec [irow , icol ]
277-
278- return expr .xreplace (substs )
279-
280-
281- def find_power_of (base : Basic , prod : Basic ) -> int | Basic :
282- # FIXME: this does not actually work with symengine (Wild is not implemented)
283- remdr = sym .Wild ("remdr" )
284- power = sym .Wild ("power" )
285-
286- result = prod .match (remdr * base ** power )
287- if result is None :
288- return 0
289-
290- return result [power ]
291-
292-
293271@prim .expr_dataclass ()
294272class SpatialConstant (prim .Variable ):
295273 """A symbolic constant to represent a symbolic variable that is spatially constant.
You can’t perform that action at this time.
0 commit comments