-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Converting an array of Any to Float : float() -> no method one(Type{Any}) #6422
Comments
Not really sure what we should do here (should float sometimes not return a float, but an array?), but until that becomes decided, you can use |
This used to work just fine, returning an array of floats.
|
It works for me on a version built yesterday. |
Gotcha, thanks. |
I'm not sure what this should do; the old behavior was effectively picking
Since |
I am pretty new to Julia, but it seems to me that type Any is causing confusion to everyone in this case. It is very convenient to have a type Any as one can do things like: Since one can also do the intention of bb is very clear - one wants to perform some kind of computation with these float (or real) numbers. So in this case, bb should be allowed to be passed to If this can not be done, then what is the sense of having type Any? |
It's fine with me if |
It's not even clear what this means. If it's minimal type that can support the necessary precision, what happens to |
That reminds me --- |
I'd be fine with a |
@bensadeghi The problem is that it is not obvious what default element type an array like @JeffBezanson For an It could be pointed out that you are able to convert the vector in the example with |
Yes, you would have to reduce |
I came up with a meaning: convert everything to |
Apologies for posting on a closed topic but I wasn't able to get |
Hi |
Please ask questions at https://discourse.julialang.org/ (also include a bit more information in your question, what package you are using etc). |
I had a question for you. I wrote an exercise and I wrote it symbolic and
now I want to convert it to a float or integer.
…On Tue, 6 Apr 2021, 16:10 Kristoffer Carlsson, ***@***.***> wrote:
Please ask questions at https://discourse.julialang.org/ (also include a
bit more information in your question, what package you are using etc).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6422 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATQQQGIYBBCAB6ACYTOHG6LTHLXJDANCNFSM4AN7W7HQ>
.
|
I understand that. The issue tracker is not a good place to ask these types of usage questions. That's why the forum at https://discourse.julialang.org/ exists. I would suggest posting your question there. And again, include more information. Just saying " I wrote an exercise and I wrote it symbolic and now I want to convert it to a float or integer" makes it very hard for anyone to understand what you are doing. Code is good to post because that is not so ambiguous. |
The text was updated successfully, but these errors were encountered: