You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update: I realised the issue is that 1) I wasn't passing in the resolution argument, and 2) the IntervalType needs to be passed in explicitly. For example, with interval = rp.RealInterval(0,100) both rp.DyadicInterval.to_dyadic_intervals(interval) and rp.DyadicInterval.to_dyadic_intervals(interval, 2) will return the above type error, however
The last two both (correctly) return the same result: [Interval(inf=0.000000, sup=64.000000, type=clopen), Interval(inf=64.000000, sup=96.000000, type=clopen), Interval(inf=96.000000, sup=100.000000, type=clopen)]
This requirement for the interval type and resolution are not documented.
OK so it seems the problem here is that the "optional" interval type argument does not have default argument (making it mandatory). The default value for the argument should be set to IntervalType::Clopen, which is the only interval type that is available right now.
Describe the bug
Passing a RealInterval into DyadicInterval.to_dyadic_intervals() throws a TypeError.
To Reproduce
The code snippet below reproduces the error.
Expected behavior
I expected a list of DyadicIntervals to be returned, instead I get:
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: