Skip to content

Broadcasting \sqrt (√) (and similar infix ops?) #23814

Open
@tkoolen

Description

@tkoolen

From https://discourse.julialang.org/t/using-with-a-vector/6025.

x = rand(3)
(x)

results in

WARNING: sqrt{T <: Number}(x::AbstractArray{T}) is deprecated, use sqrt.(x) instead.

sqrt.(x) works fine, but √.(x) results in

ERROR: syntax: invalid identifier name "."

since √ is an infix op (so .√(x) should be used, or (√).(x)).

Could √.(x) be made to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    broadcastApplying a function over a collectionparserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions