#14211: Crash due to missing sig_on in Expression.__nonzero__
-------------------------------------------------+-------------------------
Reporter: mjo | Owner: burcin
Type: defect | Status: new
Priority: critical | Milestone: sage-6.7
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: Reported upstream. Developers | Work issues:
deny it's a bug. | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by nbruin):
Replying to [comment:8 rws]:
> which is the same you get with `hash(matrix())`, so quite sensible. What
more? Why are matrices generated by `vector*vector` (the original case) or
those in a function definition (like above) mutable at all?
Because the default for matrix creation is to create a mutable matrix.
That's because a mutable matrix can be turned into an immutable one, but
not the other way around (that requires copying the matrix to a new,
mutable, one). That default is probably inconvenient for symbolics.
Are you sure this is the sole problem, though? If we try this:
{{{
def imm_mt(*args,**kwargs):
M=matrix(*args,**kwargs)
M.set_immutable()
return M
f(x)=imm_mt()
}}}
then we get
{{{
sage: hash(f(x))
0
}}}
but `bool(f(x)==f(x))` still crashes. is it trying to see if
`f(x)*f(x)^(-1)` is one?
--
Ticket URL: <http://trac.sagemath.org/ticket/14211#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.