Well, upon closer examination, I find many uses of Point in point.py that I 
don't know how to fix.  I think my Python knowledge isn't quite there yet.

It appears many of the functions are intended be called off the class 
rather than an instance, such as Point.is_collinear(p1, p2, p3, p4)

    def is_collinear(*points):
        .....
        points = [Point(a) for a in points]

and, I'm not sure what to replace Point with in these cases.

Duane


On Saturday, December 6, 2014 4:17:15 PM UTC-6, Duane Nykamp wrote:
>
> The Point class, for numerous functions, such as .evalf, returns a hard 
> coded Point class.  This means that for a derived class, these functions 
> end up returning the original Point class not the derived class.  I assume 
> there must be a way to code it differently so these functions return the 
> derived class.  For now, I'm just overriding the functions, like .evalf, 
> that I need to use so that they return my derived class.
>
> Should the calls to Point be changed to self.__class__ or is there a 
> different way one is supposed to accomplish this in Python?  If it is as 
> simple as that, I could make the change and submit a pull request.
>
> (I'm creating a derived class to get rid of the call to nsimplify, as 
> functions like doit() and bottom up get rid of the evaluate=False flag.  
> nsimplify is quite slow.  Each call to nsimplify for something like 
> Point(3.23423545235,6.345436534630) takes on the order of 100 ms.  My 
> webserver slowed to a crawl with 140 students repeatedly hitting "Submit" 
> multiple times to check answers with a problem that had less than 10 Points 
> in it.  Even with no load, the server takes over a second to grade the 
> question and spit back the results.)
>
> Thanks,
> Duane
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/d1a69ef6-a64a-415c-a4c2-ae262491c621%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to