# Latest

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

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

**Page:** 857

---

## [Problem with IncompleteLU.jl](https://discourse.julialang.org/t/problem-with-incompletelu-jl/90636)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 4\
**Last updated:** [November 22, 2022, 9:57pm UTC](https://discourse.julialang.org/t/problem-with-incompletelu-jl/90636 "2022-11-22T21:57:22Z")

</div>

I use the file transient.mtx from the SuiteSparse Matrix Collection, see https://suitesparse-collection-website.herokuapp.com/MM/Freescale/transient.tar.gz. Then I try to define an incomplete LU factorization that I app…

---

## [Extremely slow \`invoke\` when inlined](https://discourse.julialang.org/t/extremely-slow-invoke-when-inlined/90665)

<div class="topic-metadata">

**Author:** [@mateuszbaran](https://discourse.julialang.org/u/mateuszbaran)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 9:00pm UTC](https://discourse.julialang.org/t/extremely-slow-invoke-when-inlined/90665 "2022-11-22T21:00:50Z")

</div>

Consider the following code: function e() els = Any\[\[1\], 10.0\] return rand(els) end function f() a = e() g(a) end function g(a) return invoke(\*, Tuple{supertype(typeof(a)),Float64}, a, 10.0) end T…

---

## [Access denied when adding package](https://discourse.julialang.org/t/access-denied-when-adding-package/83273)

<div class="topic-metadata">

**Author:** [@luhuh](https://discourse.julialang.org/u/luhuh)\
**Replies:** 9\
**Last updated:** [November 22, 2022, 8:49pm UTC](https://discourse.julialang.org/t/access-denied-when-adding-package/83273 "2022-11-22T20:49:41Z")

</div>

Hello everyone! I’ve been having some trouble adding and building the JuMP and Clp packages on my Julia (but I got IJulia to be added and installed). The problem comes when I do Pkg.add(“JuMP”) or Pkg.add(“Clp”). The err…

---

## [Turing.jl - NUTS gets stuck in "The current proposal will be rejected... isfinite.((θ, r, ℓπ, ℓκ)) = (true, true, false, true)"](https://discourse.julialang.org/t/turing-jl-nuts-gets-stuck-in-the-current-proposal-will-be-rejected-isfinite-r-true-true-false-true/81428)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 8:37pm UTC](https://discourse.julialang.org/t/turing-jl-nuts-gets-stuck-in-the-current-proposal-will-be-rejected-isfinite-r-true-true-false-true/81428 "2022-11-22T20:37:22Z")

</div>

I am trying to implement a model similar to Maas et al 2011 - equation 12 and 13 (details of my implementation below). The issue I am facing is that I am not able to use NUTS with this model. I get repeated numerical in…

---

## [Cannot write txt file on julia(distance map)](https://discourse.julialang.org/t/cannot-write-txt-file-on-julia-distance-map/90626)

<div class="topic-metadata">

**Author:** [@dangda](https://discourse.julialang.org/u/dangda)\
**Replies:** 2\
**Last updated:** [November 22, 2022, 8:32pm UTC](https://discourse.julialang.org/t/cannot-write-txt-file-on-julia-distance-map/90626 "2022-11-22T20:32:34Z")

</div>

print(dm) Distance map of size (398, 398) julia\> using DelimitedFiles julia\> writedlm(“dmdm.txt”,dm) ERROR: MethodError: no method matching iterate(::DistanceMap) Closest candidates are: iterate(::Union{LinRange, S…

---

## [Distributed Julia, ClusterMangers package, Slurm, and CUDA on a shared file system](https://discourse.julialang.org/t/distributed-julia-clustermangers-package-slurm-and-cuda-on-a-shared-file-system/90663)

<div class="topic-metadata">

**Author:** [@asaxton](https://discourse.julialang.org/u/asaxton)\
**Replies:** 4\
**Last updated:** [November 22, 2022, 8:27pm UTC](https://discourse.julialang.org/t/distributed-julia-clustermangers-package-slurm-and-cuda-on-a-shared-file-system/90663 "2022-11-22T20:27:36Z")

</div>

Hello, I’m running Julia 1.7.3 on a cluster using Slurm to launch batch jobs. The cluster has a shared filesystem. I’m using the Slurm cluster manager from the ClusterManagers package to call addproc(...). The node I’m …

---

## [Saving data tables at different timepoints](https://discourse.julialang.org/t/saving-data-tables-at-different-timepoints/89267)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 6\
**Last updated:** [November 22, 2022, 8:09pm UTC](https://discourse.julialang.org/t/saving-data-tables-at-different-timepoints/89267 "2022-11-22T20:09:27Z")

</div>

I have a data-frame like this: julia\> df = DataFrame(A=\[1,2,3\], B=\[:x,:y,:z\], C=\[(1,3), (-2,1),(4,4)\]) 3×3 DataFrame Row │ A B C │ Int64 Symbol Tuple… ─────┼──────────────────────── 1 │ …

---

## [What in Julia is done in C?](https://discourse.julialang.org/t/what-in-julia-is-done-in-c/90661)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 6:42pm UTC](https://discourse.julialang.org/t/what-in-julia-is-done-in-c/90661 "2022-11-22T18:42:55Z")

</div>

I know that a force of Julia is that it is high level and yet, you can code low level routines natively in Julia and still obtain good performances, whereas in Python, you would be advised to bind and wrap C or Fortran c…

---

## [\[ANN\] MetalSurfaceImpedance: Rapid, accurate calculation of rough metal surface impedance](https://discourse.julialang.org/t/ann-metalsurfaceimpedance-rapid-accurate-calculation-of-rough-metal-surface-impedance/90662)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 6:29pm UTC](https://discourse.julialang.org/t/ann-metalsurfaceimpedance-rapid-accurate-calculation-of-rough-metal-surface-impedance/90662 "2022-11-22T18:29:19Z")

</div>

In computational electromagnetics, when modeling structures that include finitely conducting metal bodies that are more than several skin depths deep, one often uses a surface impedance boundary condition at the metal su…

---

## [@NLexpression involving multilinear algebra](https://discourse.julialang.org/t/nlexpression-involving-multilinear-algebra/90656)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 6:12pm UTC](https://discourse.julialang.org/t/nlexpression-involving-multilinear-algebra/90656 "2022-11-22T18:12:25Z")

</div>

What is the recommended way to implement @NLexpression(model, tr(kron(A,B)\*kron(C,D,E)) where A,B,C,D,E are (references of) matrices of JuMP variables created by @variable of compatible sizes (so matrix multiplication …

---

## [Why my Cosecant Plot different from the Textbook?](https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [November 22, 2022, 6:09pm UTC](https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660 "2022-11-22T18:09:15Z")

</div>

Hi all, I am trying to plot: f(x) = 8csc(x) + 8csc(75-x) plot(f, 0, 75) But the plot is different from the textbook, can anyone explain why? t

---

## [\[ANN\] LinearRegressionKit](https://discourse.julialang.org/t/ann-linearregressionkit/73769)

<div class="topic-metadata">

**Author:** [@Eric](https://discourse.julialang.org/u/Eric)\
**Replies:** 9\
**Last updated:** [November 22, 2022, 2:53pm UTC](https://discourse.julialang.org/t/ann-linearregressionkit/73769 "2022-11-22T14:53:34Z")

</div>

LinearRegressionKit is now in version 0.7.4 and is now registered (you can use add LinearRegressionKit from the package prompt). See LinearRegressionKit project page for details. The package LinearRegression will not be…

---

## [How to Draw This Spiral Solution Curve?](https://discourse.julialang.org/t/how-to-draw-this-spiral-solution-curve/90510)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 12\
**Last updated:** [November 22, 2022, 5:55pm UTC](https://discourse.julialang.org/t/how-to-draw-this-spiral-solution-curve/90510 "2022-11-22T17:55:22Z")

</div>

Hi all, I read this topic and it is still confusing since the differential equation is a bit different: I use only variable of t. That topic use dx/dt and dy/dt, thus I can’t really use it to my problem at hand. Thi…

---

## [Picking elements of an array](https://discourse.julialang.org/t/picking-elements-of-an-array/90519)

<div class="topic-metadata">

**Author:** [@jisutich](https://discourse.julialang.org/u/jisutich)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 5:53pm UTC](https://discourse.julialang.org/t/picking-elements-of-an-array/90519 "2022-11-22T17:53:01Z")

</div>

Hi, Suppose I have an array a like the following 5×2 Matrix{Float64}: 2.0 1.0 3.0 0.0 4.0 1.0 2.0 0.0 4.0 1.0 The second column can only be 0 or 1. Now I want to pick the rows whose second element is 0 and s…

---

## [Trajectory DynamicalSystems.jl, DifferentialEquations.jl](https://discourse.julialang.org/t/trajectory-dynamicalsystems-jl-differentialequations-jl/90659)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 5:26pm UTC](https://discourse.julialang.org/t/trajectory-dynamicalsystems-jl-differentialequations-jl/90659 "2022-11-22T17:26:09Z")

</div>

Hello, i calculate trajectory of system by ODEProblem and solve from DifferentialEquations.jl and trajectory from DynamicalSystems.jl. With the same integrator parameters, they have different results, why is this? U(y) …

---

## [JuMP constraint building with dot call: how to use @dot](https://discourse.julialang.org/t/jump-constraint-building-with-dot-call-how-to-use-dot/90632)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 4:35pm UTC](https://discourse.julialang.org/t/jump-constraint-building-with-dot-call-how-to-use-dot/90632 "2022-11-22T16:35:27Z")

</div>

julia\> using JuMP julia\> model = JuMP.Model() julia\> @variable(model, x\[1:3\]) julia\> @variable(model, y\[1:3\]) julia\> @. @constraint(model, x \<= y) gives error: ERROR: At REPL\[19\]:1: @constraint(model, (\<=).(x, y)): …

---

## [Save image meshcat](https://discourse.julialang.org/t/save-image-meshcat/90650)

<div class="topic-metadata">

**Author:** [@ga72kud](https://discourse.julialang.org/u/ga72kud)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 3:47pm UTC](https://discourse.julialang.org/t/save-image-meshcat/90650 "2022-11-22T15:47:25Z")

</div>

Save images meshcat. I use the MeshCat.jl package and want to save a png image taken from the Visualizer-Scene and save it to a specific path: I read this from the documentation save\_image(vis::Visualizer) -\> Visualize…

---

## [Extracting the last dt used by solver in DifferentialEquations.jl](https://discourse.julialang.org/t/extracting-the-last-dt-used-by-solver-in-differentialequations-jl/90647)

<div class="topic-metadata">

**Author:** [@churli](https://discourse.julialang.org/u/churli)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 3:13pm UTC](https://discourse.julialang.org/t/extracting-the-last-dt-used-by-solver-in-differentialequations-jl/90647 "2022-11-22T15:13:22Z")

</div>

As per the title, I need to be able to extract the last dt used by the ODE solver from DifferentialEquations.jl . Since in my specific use case I need to extract it whenever I terminate the solver from a callback, it do…

---

## [How to write this Boolean operator?](https://discourse.julialang.org/t/how-to-write-this-boolean-operator/90607)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 6\
**Last updated:** [November 22, 2022, 2:05pm UTC](https://discourse.julialang.org/t/how-to-write-this-boolean-operator/90607 "2022-11-22T14:05:09Z")

</div>

Y is latitude and I want those that are falling within -90 and 90 degrees. Indx = Y .\> -90 .& Y.\< 90; I tried &, &&, .&. All of them gave me headaches. What should be the correct way of expressing this in Julia? Thank…

---

## [Error installing package indent-detective Atom](https://discourse.julialang.org/t/error-installing-package-indent-detective-atom/90642)

<div class="topic-metadata">

**Author:** [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 12:51pm UTC](https://discourse.julialang.org/t/error-installing-package-indent-detective-atom/90642 "2022-11-22T12:51:22Z")

</div>

Hi , i am getting this error while installing uber juno pkg in atom Error: Installing “indent-detective@0.4.0” failed.

---

## [Convert polynomials](https://discourse.julialang.org/t/convert-polynomials/90640)

<div class="topic-metadata">

**Author:** [@irezvyakova](https://discourse.julialang.org/u/irezvyakova)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 11:40am UTC](https://discourse.julialang.org/t/convert-polynomials/90640 "2022-11-22T11:40:55Z")

</div>

Dear all, I cannot overcome just the simpliest example from Julia notes on how to convert special polynomials into a polynomial-type value. Below is the program and the Error. Where is the problem? julia\> using Polynom…

---

## [Failed to precompile Flux](https://discourse.julialang.org/t/failed-to-precompile-flux/90609)

<div class="topic-metadata">

**Author:** [@davide445](https://discourse.julialang.org/u/davide445)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 11:29am UTC](https://discourse.julialang.org/t/failed-to-precompile-flux/90609 "2022-11-22T11:29:35Z")

</div>

Seeing different threads related to packages precompilation, as beginner I understand is due mostly to packages releases incompatibilities. Still due Pluto has his own embedded package manager I’m not sure how to manage…

---

## [How to correctly set up VS working directory on Windows for project with multiple subfolders?](https://discourse.julialang.org/t/how-to-correctly-set-up-vs-working-directory-on-windows-for-project-with-multiple-subfolders/85329)

<div class="topic-metadata">

**Author:** [@tstoerk](https://discourse.julialang.org/u/tstoerk)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 11:28am UTC](https://discourse.julialang.org/t/how-to-correctly-set-up-vs-working-directory-on-windows-for-project-with-multiple-subfolders/85329 "2022-11-22T11:28:25Z")

</div>

I am on Windows, trying to move from running Julia in Jupyter notebooks to directly running my code from VisualStudio. I am working on a project that uses multiple modules (XXX.jl files) that live in one subfolder, but …

---

## [OpenCV cannot be precompiled for Julia 1.8](https://discourse.julialang.org/t/opencv-cannot-be-precompiled-for-julia-1-8/90611)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 10:56am UTC](https://discourse.julialang.org/t/opencv-cannot-be-precompiled-for-julia-1-8/90611 "2022-11-22T10:56:03Z")

</div>

julia\> using OpenCV \[ Info: Precompiling OpenCV \[f878e3a2-a245-4720-8660-60795d644f2a\] ERROR: LoadError: ccall method definition: argument 2 type doesn't correspond to a C type Stacktrace: \[1\] top-level scope @ non…

---

## [Loop through subtypes](https://discourse.julialang.org/t/loop-through-subtypes/90634)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 2\
**Last updated:** [November 22, 2022, 10:36am UTC](https://discourse.julialang.org/t/loop-through-subtypes/90634 "2022-11-22T10:36:03Z")

</div>

In my package, I have a mother type T and subtypes T1,...,Tn that all must verify some conditions. The conditions on these subtypes can easily be expressed as a test : @test my\_test\_function(T1) @test my\_test\_function(…

---

## [Speed up Ipopt solver](https://discourse.julialang.org/t/speed-up-ipopt-solver/89984)

<div class="topic-metadata">

**Author:** [@Katti](https://discourse.julialang.org/u/Katti)\
**Replies:** 12\
**Last updated:** [November 22, 2022, 10:32am UTC](https://discourse.julialang.org/t/speed-up-ipopt-solver/89984 "2022-11-22T10:32:55Z")

</div>

Hello, I have a non-linear problem which I am solving with Ipopt and JuMP. The problem originally spans over around 70 days (divided in quarter-hourly periods), but I have started to solve the model for less periods. Th…

---

## [Precompilation and finalizers](https://discourse.julialang.org/t/precompilation-and-finalizers/90635)

<div class="topic-metadata">

**Author:** [@thautwarm](https://discourse.julialang.org/u/thautwarm)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 10:00am UTC](https://discourse.julialang.org/t/precompilation-and-finalizers/90635 "2022-11-22T10:00:51Z")

</div>

I wanted to register a finalizer for instances of some specific type. The final requirement is to achieve the following features simultaneously: invoking some callback once the object is gc-ed keeping the object precom…

---

## [Why does this function allocate memory?](https://discourse.julialang.org/t/why-does-this-function-allocate-memory/90624)

<div class="topic-metadata">

**Author:** [@Nathaniel](https://discourse.julialang.org/u/Nathaniel)\
**Replies:** 6\
**Last updated:** [November 22, 2022, 9:18am UTC](https://discourse.julialang.org/t/why-does-this-function-allocate-memory/90624 "2022-11-22T09:18:17Z")

</div>

The Performance tips page in the documentation gives the following example of a function that allocates memory unexpectedly: julia\> x = rand(1000); julia\> function sum\_global() s = 0.0 for i in x …

---

## [Predefined path in Agents.jl](https://discourse.julialang.org/t/predefined-path-in-agents-jl/90625)

<div class="topic-metadata">

**Author:** [@SDA](https://discourse.julialang.org/u/SDA)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 4:32am UTC](https://discourse.julialang.org/t/predefined-path-in-agents-jl/90625 "2022-11-22T04:32:55Z")

</div>

I would like to implement an agent-based model where some agents have predefined paths. These agents will effectively be blind to other agents, who would operate under normal movement rules. For example, with the Flockin…

---

## [Unable to use @bind from PlutoUI on Colab](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590)

<div class="topic-metadata">

**Author:** [@Mahrukh](https://discourse.julialang.org/u/Mahrukh)\
**Replies:** 6\
**Last updated:** [November 22, 2022, 4:07am UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590 "2022-11-22T04:07:15Z")

</div>

Hi everyone! I’m trying to run the Julia code from https://github.com/mitmath/18S191/blob/Fall20/lecture\_notebooks/week1/01-images-intro.jl on Colab as I can’t run it on my local machine. Pretty much all cells get execut…

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

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