Giter VIP home page Giter VIP logo

Comments (1)

mcabbott avatar mcabbott commented on September 21, 2024

One way around this would be to make an SMatrix:

julia> using StaticArrays

julia> @tullio _[n]:=inv(SA[x[n] -1.0;-1.0 x[n]-e[k]])
10-element Vector{SMatrix{2, 2, Float64, 4}}:
 [-59.268603211659475 49.268603211659475; 49.268603211659475 -49.268603211659475]
 [-105.02504355561057 71.68614498769712; 71.68614498769712 -55.75589054598665]
 [32.05997726703162 -27.81109848168423; -27.81109848168423 15.450610267602352]
 [11.503726225353875 -13.83457540845129; -13.83457540845129 4.61152513615043]
 [6.187636920067604 -10.687515213340845; -10.687515213340845 1.187501690371205]
 [3.252429208089766 -9.638618976878915; -9.638618976878915 -1.070957664097657]
 [0.9437739165213922 -9.68540869449287; -9.68540869449287 -3.2284695648309567]
 [-1.5995821417135907 -10.888656745396439; -10.888656745396439 -6.049253747442466]
 [-5.961552626696227 -14.636763154097064; -14.636763154097064 -11.384149119853273]
 [-39.26860321165948 -49.26860321165948; -49.26860321165948 -49.26860321165948]

julia> ans[1]
2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2):
 -59.2686   49.2686
  49.2686  -49.2686

from tullio.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.