Skip to content

minimal set of changes for returning failure to find non-zero pivot in FFGJ #457

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion cmake/FindCython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IF (CYTHON_BIN)
RESULT_VARIABLE CYTHON_RESULT
OUTPUT_VARIABLE CYTHON_OUTPUT
ERROR_VARIABLE CYTHON_ERROR
)
)
if (CYTHON_RESULT EQUAL 0)
# Only if cython exits with the return code 0, we know that all is ok:
SET(Cython_FOUND TRUE)
Expand Down
9 changes: 5 additions & 4 deletions symengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@
from .lib.symengine_wrapper import ComplexMPC

if have_numpy:
from .lib.symengine_wrapper import (Lambdify, LambdifyCSE)

from .lib.symengine_wrapper import Lambdify, LambdifyCSE
def lambdify(args, exprs, **kwargs):
if isinstance(exprs, Basic):
exprs = [exprs]
return Lambdify(args, *exprs, **kwargs)
else:
def __getattr__(name):
if name == 'lambdify':
raise AttributeError("Cannot import numpy, which is required for `lambdify` to work")
if name in ('lambdify', 'Lambdify', 'LambdifyCSE'):
raise AttributeError(f"Cannot import numpy, which is required for `{name}` to work")
raise AttributeError(f"module 'symengine' has no attribute '{name}'")


Expand Down
Loading
Loading