On Mon, Feb 9, 2009 at 10:48 PM, Robert Kern <robert.k...@gmail.com> wrote: > > On Mon, Feb 9, 2009 at 21:33, Ondrej Certik <ond...@certik.cz> wrote: > >> So I think it's a bug. Thanks a lot for reporting it. The problem is >> with this code: >> >> if not (cond_type is bool or issubclass(cond_type, Relational) or >> \ >> issubclass(cond_type, Number)): >> raise TypeError, \ >> "Cond %s is of type %s, but must be a bool," \ >> " Relational or Number" % (ec[1], cond_type) >> >> >> It checks for bool, but not numpy.bool_. Does anyone know how to make >> it, so that it works with numpy types, but doesn't use numpy.bool_ >> explicitely? > > Do you *need* to typecheck? > > If so, then try this out: > > http://www.enthought.com/~rkern/cgi-bin/hgwebdir.cgi/deferredisinstance
I think something like that, thanks! I need to study this thoroughly, it seems to me quite complicated, but maybe that's the best we can do. Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---