-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent return type of domain
?
#456
Comments
Yes, that seems like a bug. No reason not to return a tuple in each. |
Oops, not a but. That is an artifact of |
OK, I get it. Could it be |
Yeah, I didn't want to take on that dependency, but it is useful syntax. I wish |
Maybe we could take inspiration from both. How about this? (-Inf..Inf)
[-1..1] They are clearly neither vectors nor tuples. |
That is a show method. Would be nice, though better would be |
I can make a PR. Which one do you like? Polynomials.Interval[-1,1] or |
I like the latter with ( or ) for infinite values. |
It should work now: #460 julia> using Polynomials: domain
julia> p = Polynomial([1, 2, 3, 4])
Polynomial(1 + 2*x + 3*x^2 + 4*x^3)
julia> domain(p)
(-Inf..Inf)
julia> p = ChebyshevT([1, 0, 3, 4])
ChebyshevT(1⋅T_0(x) + 3⋅T_2(x) + 4⋅T_3(x))
julia> domain(p)
[-1..1] |
Closed by #460 |
I am trying two examples and using
domain
on them. But one returns aTuple
, the other returns aVector
. Could it be unified?The text was updated successfully, but these errors were encountered: