Hi I was working on adding a fix for this but:
The current implementation of numerical_approx has
x = x = x._convert(kwds)
if is_a_numeric(x._gobj):
res = py_object_from_numeric(x._gobj)
elif is_a_constant(x._gobj):
res = x.pyobject()
else:
raise TypeError("cannot evaluate symbolic expression numerically")
If x is a n number with units (example in ticket) then it would go to the
else block, So can you suggest a check for expression which are numbers
attached with units?
On Tuesday, 27 February 2018 12:19:50 UTC+5:30, Ralf Stephan wrote:
>
> On Tuesday, February 27, 2018 at 1:06:37 AM UTC+1, Pstrang Rzekle wrote:
>
>> Is there a way to trick SageMath into presenting numeric approximations
>> with symbolics? In this specific case, handling numbers with units attached.
>>
>
> You will have to use an internal method and convert the number of digits
> to bits yourself, until that is fixed:
>
> sage: x._convert({'parent':RealField(10)})
> (1.0e-6)*centimeter
>
> Regards,
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.