Skip to content

arrayfun with symbolic array #1046

Open
@Micky71

Description

@Micky71

I wanna delete the symvars in ‘ex’ from the ‘others’

syms x y z ;others=[x,y,z]; ex=[x,y];
idx=cellfun(@(x) isempty(find(ex==x)),num2cell(others));
left=others(idx);

Thats works for me, but

idx=arrayfun(@(x) isempty(find(ex==x)),others);

error: Python exception: AssertionError: Matrices in input must all have the same shape
occurred at line 12 of the Python code block:
assert q.shape == A.shape, “Matrices in input must all have the same shape”
error: called from
pycall_sympy__ at line 178 column 7
elementwise_op at line 99 column 5
ineq_helper at line 35 column 5
eq at line 91 column 5
@ at line 1 column 15

doesn’t work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions