This package resides in the ITensor/ITensorRegistry
local registry.
In order to install, simply add that registry through your package manager.
This step is only required once.
julia> using Pkg: Pkg
julia> Pkg.Registry.add(url="https://github.com/ITensor/ITensorRegistry")
or:
julia> Pkg.Registry.add(url="[email protected]:ITensor/ITensorRegistry.git")
if you want to use SSH credentials, which can make it so you don't have to enter your Github ursername and password when registering packages.
Then, the package can be added as usual through the package manager:
julia> Pkg.add("BroadcastMapConversion")
using Base.Broadcast: broadcasted
using BroadcastMapConversion: Mapped, mapped
using Test: @test
a = randn(2, 2)
bc = broadcasted(*, 2, a)
m = Mapped(bc)
m′ = mapped(x -> 2x, a)
@test copy(m) ≈ map(m.f, m.args...)
@test copy(m) ≈ copy(m′)
@test copy(m) ≈ copy(bc)
@test axes(m) == axes(bc)
@test copyto!(similar(m, Float64), m) ≈ copyto!(similar(bc, Float64), bc)
This page was generated using Literate.jl.