# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1028

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1029

---

## [Can't add package from git - authentication failure](https://discourse.julialang.org/t/cant-add-package-from-git-authentication-failure/78078)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 11\
**Last updated:** [May 27, 2022, 1:32pm UTC](https://discourse.julialang.org/t/cant-add-package-from-git-authentication-failure/78078 "2022-05-27T13:32:32Z")

</div>

Hi. I am having trouble doing something which I have done easily in the past. I am trying to add a package from git (@v1.7) pkg\> add https://github.com/msimms/LibIsolationForest.jl.git Cloning git-repo \`https://g…

---

## [Save and plot parameter history with ModelingToolkit.jl](https://discourse.julialang.org/t/save-and-plot-parameter-history-with-modelingtoolkit-jl/81778)

<div class="topic-metadata">

**Author:** [@visr](https://discourse.julialang.org/u/visr)\
**Replies:** 1\
**Last updated:** [May 27, 2022, 12:11pm UTC](https://discourse.julialang.org/t/save-and-plot-parameter-history-with-modelingtoolkit-jl/81778 "2022-05-27T12:11:39Z")

</div>

Parameters are currently not saved over time in the solution, the way states are. This was previously discussed in Update parameters in ModelingToolkit using callbacks. Chris mentioned there that one option would be to…

---

## [New() function for Arrays](https://discourse.julialang.org/t/new-function-for-arrays/81766)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 3\
**Last updated:** [May 27, 2022, 11:09am UTC](https://discourse.julialang.org/t/new-function-for-arrays/81766 "2022-05-27T11:09:11Z")

</div>

I struggle with writing a proper constructor for my struct PERK. What gives my trouble is the usage of new() with my member arrays. The code looks like this: abstract type PERKTYPE end struct PERK \<: PERKTYPE NumSt…

---

## [VSC - building custom sysimage runs endless](https://discourse.julialang.org/t/vsc-building-custom-sysimage-runs-endless/81771)

<div class="topic-metadata">

**Author:** [@trilobit](https://discourse.julialang.org/u/trilobit)\
**Replies:** 1\
**Last updated:** [May 27, 2022, 11:03am UTC](https://discourse.julialang.org/t/vsc-building-custom-sysimage-runs-endless/81771 "2022-05-27T11:03:54Z")

</div>

I tried the experimental: Building custom sysimage First I create a directory, with an empty .jl-file. Then run: “Tasks: run build Tasks” and see this: : For a few moments everythig seems to be OK. No, errors, no…

---

## [Dynamic NL expression in julia](https://discourse.julialang.org/t/dynamic-nl-expression-in-julia/81658)

<div class="topic-metadata">

**Author:** [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 10:42am UTC](https://discourse.julialang.org/t/dynamic-nl-expression-in-julia/81658 "2022-05-27T10:42:46Z")

</div>

Hi, I am using Juniper to solve MNILP and with array of nonlinear expression i am getting invalid model error. is there a way to generate nonlinear expression names in a loop like @variable(model,x) zz=0.0 for i in 1:5 …

---

## [Cannot multiply a quadratic expression by an aff. expression](https://discourse.julialang.org/t/cannot-multiply-a-quadratic-expression-by-an-aff-expression/81742)

<div class="topic-metadata">

**Author:** [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 10:34am UTC](https://discourse.julialang.org/t/cannot-multiply-a-quadratic-expression-by-an-aff-expression/81742 "2022-05-27T10:34:16Z")

</div>

using Cbc,JuMP,LinearAlgebra, Juniper,Ipopt,HiGHS; optimizer = Juniper.Optimizer; nl\_solver = optimizer\_with\_attributes(Ipopt.Optimizer); mip\_solver = optimizer\_with\_attributes(HiGHS.Optimizer); mod2 = Model(optimizer\_…

---

## [Is there a way to precondition eigensolver?](https://discourse.julialang.org/t/is-there-a-way-to-precondition-eigensolver/20790)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 9\
**Last updated:** [May 27, 2022, 9:46am UTC](https://discourse.julialang.org/t/is-there-a-way-to-precondition-eigensolver/20790 "2022-05-27T09:46:36Z")

</div>

Hello everyone. I am solving a nonlinear matrix equation which can be solved be solved iteratively. A single iteration contains construction of a matrix H, its diagonalization and solution of a nonlinear equation for ope…

---

## [Typing declaring Real numbers and using Vectors as default arguments](https://discourse.julialang.org/t/typing-declaring-real-numbers-and-using-vectors-as-default-arguments/81768)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 5\
**Last updated:** [May 27, 2022, 9:34am UTC](https://discourse.julialang.org/t/typing-declaring-real-numbers-and-using-vectors-as-default-arguments/81768 "2022-05-27T09:34:47Z")

</div>

In Python I can make a method from typing import Optional, List from numbers import Real def mul(a, m:Optional\[List\[Real\]\]=None): m = \[1,2\] if m is None else m return a\*m\[0\], a\*m\[1\] Which allows \>\>\> mul(2) (2,…

---

## [Converting Pandas Dataframe returned from PyCall to Julia DataFrame](https://discourse.julialang.org/t/converting-pandas-dataframe-returned-from-pycall-to-julia-dataframe/43001)

<div class="topic-metadata">

**Author:** [@clibassi](https://discourse.julialang.org/u/clibassi)\
**Replies:** 18\
**Last updated:** [May 27, 2022, 6:43am UTC](https://discourse.julialang.org/t/converting-pandas-dataframe-returned-from-pycall-to-julia-dataframe/43001 "2022-05-27T06:43:37Z")

</div>

I’ve been trying to pull some baseball data into a dataframe and there’s a very nice Python package called pybaseball for conveniently doing this. So I’ve been playing with using PyCall to pull this data in - but am runn…

---

## ["non-matching indices between left and right hand side:" in using @tensor in function](https://discourse.julialang.org/t/non-matching-indices-between-left-and-right-hand-side-in-using-tensor-in-function/81763)

<div class="topic-metadata">

**Author:** [@Geositta](https://discourse.julialang.org/u/Geositta)\
**Replies:** 0\
**Last updated:** [May 27, 2022, 6:36am UTC](https://discourse.julialang.org/t/non-matching-indices-between-left-and-right-hand-side-in-using-tensor-in-function/81763 "2022-05-27T06:36:43Z")

</div>

Hi, I have the following code using BenchmarkTools, TensorOperations, LoopVectorization function level4(A, factor) @tensor B\[i,j,k,l\] := factor\[1\]\* A\[i, j, k, l\] + factor\[2\]\* A\[i, j, l, k\] + factor\[3\]\* A…

---

## [Meta: Could We Have an Appreciation Tag or Category?](https://discourse.julialang.org/t/meta-could-we-have-an-appreciation-tag-or-category/81728)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 5\
**Last updated:** [May 27, 2022, 6:15am UTC](https://discourse.julialang.org/t/meta-could-we-have-an-appreciation-tag-or-category/81728 "2022-05-27T06:15:24Z")

</div>

Hi all, Every so often I see posts that are appreciation posts for packages, people, or the Julia ecosystem. Would it be possible to have a tag or category for appreciation posts? It would be nice to have these groupe…

---

## [Any plan for functionality like Pandas loc?](https://discourse.julialang.org/t/any-plan-for-functionality-like-pandas-loc/81134)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 15\
**Last updated:** [May 27, 2022, 4:09am UTC](https://discourse.julialang.org/t/any-plan-for-functionality-like-pandas-loc/81134 "2022-05-27T04:09:52Z")

</div>

A cool feature of Pandas is the ability to set an index on a table. Thereafter you just specify table name and index value you want to use. Combined with Julia tools like @rtransform a DataFrame cell could be specifie…

---

## [Question about precompile](https://discourse.julialang.org/t/question-about-precompile/81756)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 3\
**Last updated:** [May 27, 2022, 3:35am UTC](https://discourse.julialang.org/t/question-about-precompile/81756 "2022-05-27T03:35:26Z")

</div>

Dear all, Why it always say “2 skipped during auto due to previous errors”. How to find which packages get error? (576 already precompiled, 2 skipped during auto due to previous errors)

---

## [VideoIO: avformat\_open\_input error code -5](https://discourse.julialang.org/t/videoio-avformat-open-input-error-code-5/81758)

<div class="topic-metadata">

**Author:** [@YANTAN520](https://discourse.julialang.org/u/YANTAN520)\
**Replies:** 0\
**Last updated:** [May 27, 2022, 3:14am UTC](https://discourse.julialang.org/t/videoio-avformat-open-input-error-code-5/81758 "2022-05-27T03:14:36Z")

</div>

When I run the following code, the following error appears. julia\>t = VideoIO.get\_camera\_devices(ffmpeg, "dshow", "dummy") julia\>VideoIO.opencamera(t\[1\]) ERROR: Could not open USB2.0 HD UVC WebCam. avformat\_open\_input e…

---

## [GalacticOptim.solve ignores callback](https://discourse.julialang.org/t/galacticoptim-solve-ignores-callback/81670)

<div class="topic-metadata">

**Author:** [@mzhenirovskyy](https://discourse.julialang.org/u/mzhenirovskyy)\
**Replies:** 1\
**Last updated:** [May 27, 2022, 3:09am UTC](https://discourse.julialang.org/t/galacticoptim-solve-ignores-callback/81670 "2022-05-27T03:09:35Z")

</div>

Hi All, It seems the callback doesn’t work when it is called from “GalacticOptim.solve”. using DifferentialEquations, DiffEqFlux, GalacticOptim function lotka\_volterra!(du, u, p, t) x, y = u α, β, δ, γ = p du\[1\]…

---

## [Computed goto (or labels as values) in Julia?](https://discourse.julialang.org/t/computed-goto-or-labels-as-values-in-julia/5013)

<div class="topic-metadata">

**Author:** [@bicycle1885](https://discourse.julialang.org/u/bicycle1885)\
**Replies:** 9\
**Last updated:** [May 27, 2022, 2:54am UTC](https://discourse.julialang.org/t/computed-goto-or-labels-as-values-in-julia/5013 "2022-05-27T02:54:07Z")

</div>

Hi, I’m now interested in improving the performance of Julia code that emulates a finite state machine. It reads input data byte by byte and branches based on it. A branch looks like this: byte = data\[p+=1\] if byte in …

---

## [VS Code extremely slow to execute code](https://discourse.julialang.org/t/vs-code-extremely-slow-to-execute-code/81520)

<div class="topic-metadata">

**Author:** [@lzxnl](https://discourse.julialang.org/u/lzxnl)\
**Replies:** 4\
**Last updated:** [May 27, 2022, 2:50am UTC](https://discourse.julialang.org/t/vs-code-extremely-slow-to-execute-code/81520 "2022-05-27T02:50:10Z")

</div>

When I start up VS Code, the first time I want to execute code, it does so ok. The second time, if I highlight some code to run with Shift-Enter, it will stop, and will take longer to reply than just restarting VS Code, …

---

## [Creating a tuple from combination of tuple and vectors](https://discourse.julialang.org/t/creating-a-tuple-from-combination-of-tuple-and-vectors/81705)

<div class="topic-metadata">

**Author:** [@joxane7887](https://discourse.julialang.org/u/joxane7887)\
**Replies:** 5\
**Last updated:** [May 27, 2022, 2:43am UTC](https://discourse.julialang.org/t/creating-a-tuple-from-combination-of-tuple-and-vectors/81705 "2022-05-27T02:43:49Z")

</div>

I’d like to combine three thing; a Vector{Tuple{Int64, Int64}}, Vector{Vector{Int64}}, and a Vector{Int64} under some condition to be able to create a new tuple; in other words; a Vector{Tuple{Int64, Int64, Int64}}. And …

---

## [How to perform this summation in Julia](https://discourse.julialang.org/t/how-to-perform-this-summation-in-julia/81746)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 1:34am UTC](https://discourse.julialang.org/t/how-to-perform-this-summation-in-julia/81746 "2022-05-27T01:34:53Z")

</div>

Kint = b\*((2\*(lB+mB+nB))+3)\*Sxyz(RA, RB, a, b, lA, lB, mA, mB, nA, nB) #print("$Kint \\n") Kint -= (2\*(b^2))\*Sxyz(RA, RB, a, b, lA, lB+2, mA, mB, nA, nB) Kint -= (2\*(b^2))\*Sxyz(RA, RB, a, b, lA, lB, mA, …

---

## [Using the Pkg REPL mode directly from the terminal](https://discourse.julialang.org/t/using-the-pkg-repl-mode-directly-from-the-terminal/81752)

<div class="topic-metadata">

**Author:** [@dylanxyz](https://discourse.julialang.org/u/dylanxyz)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 12:42am UTC](https://discourse.julialang.org/t/using-the-pkg-repl-mode-directly-from-the-terminal/81752 "2022-05-27T00:42:52Z")

</div>

I often need to start julia, enter the Pkg REPL to add and remove packages and then exit. I’m a lazy person, so is often too much work for me to do: julia --project julia\> \] pkg\> add Foo Bar pkg\> rm SomePkg julia\> exit(…

---

## [Question about RCall](https://discourse.julialang.org/t/question-about-rcall/81744)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 1\
**Last updated:** [May 27, 2022, 12:18am UTC](https://discourse.julialang.org/t/question-about-rcall/81744 "2022-05-27T00:18:32Z")

</div>

Dear all, When I use RCall, it always gets an error. julia\> using RCall \[ Info: Precompiling RCall \[6f49c342-dc21-5d91-9882-a32aef131414\] WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irratio…

---

## [\[ANN\] Joysticks.jl Version 0.1.3](https://discourse.julialang.org/t/ann-joysticks-jl-version-0-1-3/81749)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [May 26, 2022, 10:40pm UTC](https://discourse.julialang.org/t/ann-joysticks-jl-version-0-1-3/81749 "2022-05-26T22:40:16Z")

</div>

Joystick interface for Julia This is the first version that is cross-platform and tested on Windows and Linux. It should also work on Mac, but I cannot test that (voluteers welcome). Compared to using the bare Joystic…

---

## [JuMP creating a huge MPS file](https://discourse.julialang.org/t/jump-creating-a-huge-mps-file/81477)

<div class="topic-metadata">

**Author:** [@Popeye](https://discourse.julialang.org/u/Popeye)\
**Replies:** 22\
**Last updated:** [May 26, 2022, 10:30pm UTC](https://discourse.julialang.org/t/jump-creating-a-huge-mps-file/81477 "2022-05-26T22:30:28Z")

</div>

Further to my question, here How to specify barrier method to use? - Specific Domains / Optimization (Mathematical) - JuliaLang, I have given an example of a case where it is taking too long to build the model or write a…

---

## [Julia can't solve sparse linear system, MATLAB can](https://discourse.julialang.org/t/julia-cant-solve-sparse-linear-system-matlab-can/81692)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 5\
**Last updated:** [May 26, 2022, 10:12pm UTC](https://discourse.julialang.org/t/julia-cant-solve-sparse-linear-system-matlab-can/81692 "2022-05-26T22:12:46Z")

</div>

I am trying to solve a sparse linear system, but Julia 1.7.2 crashes (I believe it’s an OutOfMemoryError()): infil\> size(A) (2938746, 6906) infil\> nnz(A) 17591409 infil\> nnz(A)/prod(size(A)) 0.0008667862253365853 inf…

---

## [\[ANN\] PermutationSymmetricTensors.jl: Multidimensional arrays that are symmetric under index permutation](https://discourse.julialang.org/t/ann-permutationsymmetrictensors-jl-multidimensional-arrays-that-are-symmetric-under-index-permutation/81748)

<div class="topic-metadata">

**Author:** [@IlianPihlajamaa](https://discourse.julialang.org/u/IlianPihlajamaa)\
**Replies:** 0\
**Last updated:** [May 26, 2022, 9:49pm UTC](https://discourse.julialang.org/t/ann-permutationsymmetrictensors-jl-multidimensional-arrays-that-are-symmetric-under-index-permutation/81748 "2022-05-26T21:49:52Z")

</div>

I am happy to announce my first package: PermutationSymmetricTensors.jl. Feel free to try it out and let me know what you think. Suggestions, issues, feature and/or pull requests are very welcome. Note that, although I …

---

## [Archival of discontinued packages in JuliaML](https://discourse.julialang.org/t/archival-of-discontinued-packages-in-juliaml/81375)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 11\
**Last updated:** [May 26, 2022, 9:27pm UTC](https://discourse.julialang.org/t/archival-of-discontinued-packages-in-juliaml/81375 "2022-05-26T21:27:08Z")

</div>

I am cleaning the house in JuliaML and will proceed with a sequence of archival operations to facilitate the lives of newcomers who come to Julia and are completely lost in the middle of packages that don’t even load any…

---

## [Question about PyPlot](https://discourse.julialang.org/t/question-about-pyplot/81738)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 14\
**Last updated:** [May 26, 2022, 9:08pm UTC](https://discourse.julialang.org/t/question-about-pyplot/81738 "2022-05-26T21:08:31Z")

</div>

Dear all, When I use PyPlot, It always gets an error. julia\> using PyPlot julia\> x = 1:2:100 1:2:99 julia\> y = 2x; julia\> plot(x, y) ERROR: ArgumentError: hasproperty of NULL PyObject Stacktrace: \[1\] pyhasproperty(…

---

## [Julian way of preallocating arrays](https://discourse.julialang.org/t/julian-way-of-preallocating-arrays/81741)

<div class="topic-metadata">

**Author:** [@Miguel\_P\_Encinar](https://discourse.julialang.org/u/Miguel_P_Encinar)\
**Replies:** 2\
**Last updated:** [May 26, 2022, 7:34pm UTC](https://discourse.julialang.org/t/julian-way-of-preallocating-arrays/81741 "2022-05-26T19:34:09Z")

</div>

Hi guys, I’m learning Julia, and I’m trying to get things done “as Julian as possible”. My case scenario is HPC, so things have to be fast. I’d like to preallocate work arrays that need to be used inside a function, e.…

---

## [How to simplify this code?](https://discourse.julialang.org/t/how-to-simplify-this-code/81734)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [May 26, 2022, 6:48pm UTC](https://discourse.julialang.org/t/how-to-simplify-this-code/81734 "2022-05-26T18:48:37Z")

</div>

I have the following type: mutable struct JSButtonState btn1::Observable{Bool} btn2::Observable{Bool} btn3::Observable{Bool} btn4::Observable{Bool} btn5::Observable{Bool} btn6::Observable{Bool} …

---

## [Conditional left join 2 dataframes when none of the columns are common](https://discourse.julialang.org/t/conditional-left-join-2-dataframes-when-none-of-the-columns-are-common/81401)

<div class="topic-metadata">

**Author:** [@vtomar](https://discourse.julialang.org/u/vtomar)\
**Replies:** 26\
**Last updated:** [May 26, 2022, 6:28pm UTC](https://discourse.julialang.org/t/conditional-left-join-2-dataframes-when-none-of-the-columns-are-common/81401 "2022-05-26T18:28:31Z")

</div>

df1 = DataFrame(id = \[1,101,1001\], b = \[1,2,3\]) df2 = DataFrame(id1 = \[0, 95 \], id2 = \[50, 150 \], c = \[2,3\]) I want to conditionally left join df1 and df2 such that id1 \< id \< id2 and all the rows in df1 appear in t…

[Previous page](https://discourse.julialang.org/latest.md?page=1027)

[Next page](https://discourse.julialang.org/latest.md?page=1029)
