# Latest

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

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

**Page:** 1014

---

## [Replacement for Pkg.dependents() in 1.0?](https://discourse.julialang.org/t/replacement-for-pkg-dependents-in-1-0/24131)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 17\
**Last updated:** [June 11, 2022, 11:55am UTC](https://discourse.julialang.org/t/replacement-for-pkg-dependents-in-1-0/24131 "2022-06-11T11:55:56Z")

</div>

I was using Pkg.dependents("PkgName") to get data for these force directed graphs of the Julia ecosystem last year. Now I need to actually use them and Pkg.dependents() is gone! any ideas how to build a list of all packa…

---

## [VScode source to terminal bug?](https://discourse.julialang.org/t/vscode-source-to-terminal-bug/82588)

<div class="topic-metadata">

**Author:** [@laut](https://discourse.julialang.org/u/laut)\
**Replies:** 1\
**Last updated:** [June 11, 2022, 8:45am UTC](https://discourse.julialang.org/t/vscode-source-to-terminal-bug/82588 "2022-06-11T08:45:49Z")

</div>

I’m using VScode: Version: 1.66.2 Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977 Date: 2022-04-11T07:49:20.994Z (2 mos ago) Electron: 17.2.0 Chromium: 98.0.4758.109 Node.js: 16.13.0 V8: 9.8.177.11-electron.0 OS…

---

## [DiffEqs: Hybrid (continuous+discrete) system / periodic callback](https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791)

<div class="topic-metadata">

**Author:** [@asprionj](https://discourse.julialang.org/u/asprionj)\
**Replies:** 43\
**Last updated:** [June 11, 2022, 5:10am UTC](https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791 "2022-06-11T05:10:12Z")

</div>

I want to model the combination of a physical (and thus continuous-time) system with a (discrete-time) controller. The controller algorithm is executed, say, every second. The output of the controller (that thus changes …

---

## [Type instability inside function with function as input argument](https://discourse.julialang.org/t/type-instability-inside-function-with-function-as-input-argument/82585)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 3\
**Last updated:** [June 11, 2022, 12:25am UTC](https://discourse.julialang.org/t/type-instability-inside-function-with-function-as-input-argument/82585 "2022-06-11T00:25:36Z")

</div>

The following is part of the code for some FEM calculations: function assemble\_Ab(x, a\_fun, c\_fun, f\_fun, order::Integer=1) N = length(x) A = zeros(N,N) b = zeros(N) if order == 1 …

---

## [Makie title and xlabel weirdness](https://discourse.julialang.org/t/makie-title-and-xlabel-weirdness/82578)

<div class="topic-metadata">

**Author:** [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 10:06pm UTC](https://discourse.julialang.org/t/makie-title-and-xlabel-weirdness/82578 "2022-06-10T22:06:22Z")

</div>

I have a question about why the approach to making a supertitle and updating it works in the first instance with the volume plots, but not in the second instance with the heatmaps? In both cases, I create the new fig\[0,…

---

## [Ifelse and datawrangling](https://discourse.julialang.org/t/ifelse-and-datawrangling/82530)

<div class="topic-metadata">

**Author:** [@wub7quxa](https://discourse.julialang.org/u/wub7quxa)\
**Replies:** 6\
**Last updated:** [June 10, 2022, 10:05pm UTC](https://discourse.julialang.org/t/ifelse-and-datawrangling/82530 "2022-06-10T22:05:06Z")

</div>

Let’s say I have the dataframe using DataFrames a1=DataFrame(A=1:3, B=5:7) and I want to replace 1 by USA, 2 by MEX, and 3 by CAN in the first column. I can do a2=hcat( ifelse.(a1\[!,\[:A\]\].==1,"USA", ifelse.(a1…

---

## [Shouldn't \`findfirst\` propagate \`missing\` instead of erroring?](https://discourse.julialang.org/t/shouldnt-findfirst-propagate-missing-instead-of-erroring/82569)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 8\
**Last updated:** [June 10, 2022, 7:24pm UTC](https://discourse.julialang.org/t/shouldnt-findfirst-propagate-missing-instead-of-erroring/82569 "2022-06-10T19:24:38Z")

</div>

The whole idea of missing vs nothing is that the first one should propagate but not erroring, but then: a = findfirst(x -\> x == 1, \[1,0,missing, 1\]) # out: 1, ok b = findfirst(x -\> x == 1, \[0,0,missing, 1\]) # out: error…

---

## [Auto-adjusting grid with CairoMakie heathmap](https://discourse.julialang.org/t/auto-adjusting-grid-with-cairomakie-heathmap/82557)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 6:23pm UTC](https://discourse.julialang.org/t/auto-adjusting-grid-with-cairomakie-heathmap/82557 "2022-06-10T18:23:58Z")

</div>

Hello, I am generating a heatmap and I would like to highlight the cells. I managed to dot that with 5 cells per side (n=5): using CairoMakie using ColorSchemes n=5 xs = 1:n ys = 1:n grid1 = rand(Float16, n, n) grid2 =…

---

## [Is there something like skimage's view\_as\_windows in Julia?](https://discourse.julialang.org/t/is-there-something-like-skimages-view-as-windows-in-julia/82532)

<div class="topic-metadata">

**Author:** [@Shirakumo](https://discourse.julialang.org/u/Shirakumo)\
**Replies:** 3\
**Last updated:** [June 10, 2022, 5:42pm UTC](https://discourse.julialang.org/t/is-there-something-like-skimages-view-as-windows-in-julia/82532 "2022-06-10T17:42:31Z")

</div>

Hello everyone, in Python there is a library, to be specific skimage.util.shape and there is view\_as windows which allow for something like this: A array(\[\[ 0, 1, 2, 3\], \[ 4, 5, 6, 7\], \[ 8, 9, 10, …

---

## [Spurious parentheses in generated expression](https://discourse.julialang.org/t/spurious-parentheses-in-generated-expression/82572)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 3\
**Last updated:** [June 10, 2022, 4:51pm UTC](https://discourse.julialang.org/t/spurious-parentheses-in-generated-expression/82572 "2022-06-10T16:51:58Z")

</div>

I have a regression test that’s failing. It’s testing a helper function to a macro that adds a source slot to a struct definition and modifies the constructor methods appropriately. That helper function returns this ex…

---

## [Mechanism type in RigidBodyDynamics.jl defaulting to Mechanism type in ConstrainedDynamics.jl](https://discourse.julialang.org/t/mechanism-type-in-rigidbodydynamics-jl-defaulting-to-mechanism-type-in-constraineddynamics-jl/82525)

<div class="topic-metadata">

**Author:** [@jpro](https://discourse.julialang.org/u/jpro)\
**Replies:** 1\
**Last updated:** [June 10, 2022, 3:40pm UTC](https://discourse.julialang.org/t/mechanism-type-in-rigidbodydynamics-jl-defaulting-to-mechanism-type-in-constraineddynamics-jl/82525 "2022-06-10T15:40:04Z")

</div>

I’m new to the RigidBodyDynamics package and wanted to follow this tutorial. Quickstart - double pendulum When I call the Mechanism type I get errors. Here is my code along with the errors. It appears based on the erro…

---

## [How to write a constraint Julia-jump](https://discourse.julialang.org/t/how-to-write-a-constraint-julia-jump/82513)

<div class="topic-metadata">

**Author:** [@lausilvag](https://discourse.julialang.org/u/lausilvag)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 3:12pm UTC](https://discourse.julialang.org/t/how-to-write-a-constraint-julia-jump/82513 "2022-06-10T15:12:07Z")

</div>

Hi guys, i am new in julia and i need to write this constraint @FOR(pilotos(i): @for(vuelos(j): @for(vuelos(k) j#ne#k #and# dia(j)#eq#dia(k) #and# inicio(j)#le#inicio(k) #and# fin(j)#gt#inicio(k) : x(i,j)+x(i,k)\<=1))); …

---

## [\[solved\] A case where dijkstra\_shortest\_paths fails (due to the negative weight)](https://discourse.julialang.org/t/solved-a-case-where-dijkstra-shortest-paths-fails-due-to-the-negative-weight/82564)

<div class="topic-metadata">

**Author:** [@HanBBer](https://discourse.julialang.org/u/HanBBer)\
**Replies:** 4\
**Last updated:** [June 10, 2022, 2:25pm UTC](https://discourse.julialang.org/t/solved-a-case-where-dijkstra-shortest-paths-fails-due-to-the-negative-weight/82564 "2022-06-10T14:25:32Z")

</div>

I’m unsure if the Dijkstra algorithm should quit for any proper case. But it got stuck during my work, and attached belong is a code for reproducing. using Graphs node1 = \[1 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 8 8 8 8 9 …

---

## [Adding Threads](https://discourse.julialang.org/t/adding-threads/36011)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 4\
**Last updated:** [June 10, 2022, 2:01pm UTC](https://discourse.julialang.org/t/adding-threads/36011 "2022-06-10T14:01:24Z")

</div>

i’m newbie parallel computing and i’m trying to practice it a little bit and when i want to add threads: set JULIA\_NUM\_THREADS =4 i get this Error and i don’t get if i should add something or what: ERROR: syntax: extra t…

---

## [Boolean Indexing](https://discourse.julialang.org/t/boolean-indexing/82556)

<div class="topic-metadata">

**Author:** [@lazycoder](https://discourse.julialang.org/u/lazycoder)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 1:30pm UTC](https://discourse.julialang.org/t/boolean-indexing/82556 "2022-06-10T13:30:24Z")

</div>

I’m a little confused on boolean indexing, I’m trying to do something like this: test=5.4 res=fill(0,size(test)) res\[test .\> 5\] .=5 The size of test could be one or more, but when test is a size of one I get an error w…

---

## [Matrix indexing and manipulation](https://discourse.julialang.org/t/matrix-indexing-and-manipulation/82563)

<div class="topic-metadata">

**Author:** [@Emilio](https://discourse.julialang.org/u/Emilio)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 1:15pm UTC](https://discourse.julialang.org/t/matrix-indexing-and-manipulation/82563 "2022-06-10T13:15:11Z")

</div>

Hello there! I’m quite new to Julia and facing following issue: assume that we have a matrix: mat = \[1 2 3 4; 2 3 4 5\] and I want to manipulate a single value from a part of the matrix like this: mat\[1:3,1:3\]\[1\] = 2 t…

---

## [How to find an indirect dependency inside a module?](https://discourse.julialang.org/t/how-to-find-an-indirect-dependency-inside-a-module/82559)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 8\
**Last updated:** [June 10, 2022, 12:08pm UTC](https://discourse.julialang.org/t/how-to-find-an-indirect-dependency-inside-a-module/82559 "2022-06-10T12:08:06Z")

</div>

Say that I have a package Foo with direct and indirect dependencies A \<- B \<- C (i.e., A loads B and B loads C) and my package looks like module Foo using A \[...\] end also say that I’m given a type T in C printed as…

---

## [Application does not load all artifacts during compilation](https://discourse.julialang.org/t/application-does-not-load-all-artifacts-during-compilation/82493)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 4\
**Last updated:** [June 10, 2022, 11:52am UTC](https://discourse.julialang.org/t/application-does-not-load-all-artifacts-during-compilation/82493 "2022-06-10T11:52:50Z")

</div>

I’m currently trying to compile an app using PackageCompiler. The associated project App depends on two packages Foo and Bar. Foo itself depends on MKL which depends on MKL\_jll (which are present in the Manifest.toml of…

---

## [Searching for strings with \`@\` at symbol as the prefix](https://discourse.julialang.org/t/searching-for-strings-with-at-symbol-as-the-prefix/82538)

<div class="topic-metadata">

**Author:** [@akvsak](https://discourse.julialang.org/u/akvsak)\
**Replies:** 4\
**Last updated:** [June 10, 2022, 10:23am UTC](https://discourse.julialang.org/t/searching-for-strings-with-at-symbol-as-the-prefix/82538 "2022-06-10T10:23:14Z")

</div>

I wanted to search for posts with @time in the search bar but keep getting username suggestions. I also tried using quotes “@time” but it didn’t return anything. Is there any workaround this? I am assuming Discourse as…

---

## [Is OpenStreetMap.jl package still maintained? Pkg.add("OpenStreetMap") gives an Error "OpenStreetMap not found in project, manifest or registry"](https://discourse.julialang.org/t/is-openstreetmap-jl-package-still-maintained-pkg-add-openstreetmap-gives-an-error-openstreetmap-not-found-in-project-manifest-or-registry/77102)

<div class="topic-metadata">

**Author:** [@Optimization](https://discourse.julialang.org/u/Optimization)\
**Replies:** 3\
**Last updated:** [June 10, 2022, 10:05am UTC](https://discourse.julialang.org/t/is-openstreetmap-jl-package-still-maintained-pkg-add-openstreetmap-gives-an-error-openstreetmap-not-found-in-project-manifest-or-registry/77102 "2022-06-10T10:05:31Z")

</div>

Hi when I try to add this package within Julia using Pkg.add("OpenStreetMap") it gives the following error. why this is the case? Is OpenStreetMap.jl package still maintained? Thanks julia\> using Pkg julia\> Pkg.add("…

---

## [Julia 1.6.6 LTS / 1.7.3 / 1.8.0-rc1 | Pkg.update() → "could not download registries (thread failed to start)"](https://discourse.julialang.org/t/julia-1-6-6-lts-1-7-3-1-8-0-rc1-pkg-update-could-not-download-registries-thread-failed-to-start/82407)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 7:32am UTC](https://discourse.julialang.org/t/julia-1-6-6-lts-1-7-3-1-8-0-rc1-pkg-update-could-not-download-registries-thread-failed-to-start/82407 "2022-06-10T07:32:10Z")

</div>

Hello, julia\> versioninfo() Julia Version 1.7.3 Commit 742b9abb4d (2022-05-06 12:58 UTC) Platform Info: OS: Windows (x86\_64-w64-mingw32) CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz WORD\_SIZE: 64 LIBM: libopenl…

---

## [View or copy: looking for an overview](https://discourse.julialang.org/t/view-or-copy-looking-for-an-overview/82495)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 8\
**Last updated:** [June 9, 2022, 8:29pm UTC](https://discourse.julialang.org/t/view-or-copy-looking-for-an-overview/82495 "2022-06-09T20:29:42Z")

</div>

I am looking for an overview/recommendations on the classical view or copy issue. Any links? Background: even in a simple case like sum(x\[ind\]) versus sum(view(x,ind)), the former seems to be faster in many cases (eg.…

---

## [I have an INLP and a linear relaxation; I want to steal someone else's branch-and-bound algorithm](https://discourse.julialang.org/t/i-have-an-inlp-and-a-linear-relaxation-i-want-to-steal-someone-elses-branch-and-bound-algorithm/82472)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 7:04am UTC](https://discourse.julialang.org/t/i-have-an-inlp-and-a-linear-relaxation-i-want-to-steal-someone-elses-branch-and-bound-algorithm/82472 "2022-06-10T07:04:56Z")

</div>

Suppose I have a binary optimization problem of the form maximize f(x) (1) subject to Ax ≤ b x binary Here f(x) is a disgusting, nonlinear, nonconcave black bo…

---

## [Exponentiation and machine precision](https://discourse.julialang.org/t/exponentiation-and-machine-precision/79024)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 18\
**Last updated:** [June 8, 2022, 9:16am UTC](https://discourse.julialang.org/t/exponentiation-and-machine-precision/79024 "2022-06-08T09:16:10Z")

</div>

In some simulations I am encountering a problem due to machine precision. I have to conduct an exponentiation operation on a number that lies in (0, 1). That number comes from a random number generator, while the exponen…

---

## [Integration with LibreOffice](https://discourse.julialang.org/t/integration-with-libreoffice/27316)

<div class="topic-metadata">

**Author:** [@XVilka](https://discourse.julialang.org/u/XVilka)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 5:29am UTC](https://discourse.julialang.org/t/integration-with-libreoffice/27316 "2022-06-10T05:29:46Z")

</div>

Julia Computing offers the JuliaInXL package - Julia integration with Microsoft Excel: https://juliacomputing.com/blog/2017/10/24/julia-in-xl-intro.html https://juliacomputing.com/products/juliafin.html#excel JuliaInXL…

---

## [Undesired and inconsistent returning of NaN when instantiating a custom structure several times](https://discourse.julialang.org/t/undesired-and-inconsistent-returning-of-nan-when-instantiating-a-custom-structure-several-times/82529)

<div class="topic-metadata">

**Author:** [@klaus.68](https://discourse.julialang.org/u/klaus.68)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 3:31am UTC](https://discourse.julialang.org/t/undesired-and-inconsistent-returning-of-nan-when-instantiating-a-custom-structure-several-times/82529 "2022-06-10T03:31:16Z")

</div>

Hi, This is my first post to the boards about a behavior I haven’t seen yet in a forum (appreciate any direction to a post if it exists!). I was attempting to build a b-spline structure atop a polynomial structure, and …

---

## [Successful Static Compilation of Julia Code for use in Production](https://discourse.julialang.org/t/successful-static-compilation-of-julia-code-for-use-in-production/79318)

<div class="topic-metadata">

**Author:** [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Replies:** 9\
**Last updated:** [June 10, 2022, 2:11am UTC](https://discourse.julialang.org/t/successful-static-compilation-of-julia-code-for-use-in-production/79318 "2022-06-10T02:11:36Z")

</div>

The StaticCompiler package was recently registered. This post records a successful experiment to statically compile a piece of Julia code into a small .so library on Linux, which is then loaded from Python and used in tr…

---

## [How do I extract a trace of the optimization steps in JuMP](https://discourse.julialang.org/t/how-do-i-extract-a-trace-of-the-optimization-steps-in-jump/82328)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 8\
**Last updated:** [June 10, 2022, 12:43am UTC](https://discourse.julialang.org/t/how-do-i-extract-a-trace-of-the-optimization-steps-in-jump/82328 "2022-06-10T00:43:50Z")

</div>

During optimization via some interior point method or similar the solver will compute the value of the objective and probably a bunch of other things. And one should see it going down Is there a standard way to captur…

---

## [Is this a good illustration of the principle "Don't store fields you can compute on demand"?](https://discourse.julialang.org/t/is-this-a-good-illustration-of-the-principle-dont-store-fields-you-can-compute-on-demand/82496)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 6\
**Last updated:** [June 9, 2022, 10:26pm UTC](https://discourse.julialang.org/t/is-this-a-good-illustration-of-the-principle-dont-store-fields-you-can-compute-on-demand/82496 "2022-06-09T22:26:17Z")

</div>

Motivation I was reading @jakobnissen 's blog post about optimizing Julia code and came across this interesting tip: Do not store fields that can easily be computed on demand. In my code, I am working on a numerical …

---

## [GLM.jl LogisticRegression errors: matrix is not positive definite; Cholesky factorization failed](https://discourse.julialang.org/t/glm-jl-logisticregression-errors-matrix-is-not-positive-definite-cholesky-factorization-failed/28981)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 14\
**Last updated:** [June 9, 2022, 10:04pm UTC](https://discourse.julialang.org/t/glm-jl-logisticregression-errors-matrix-is-not-positive-definite-cholesky-factorization-failed/28981 "2022-06-09T22:04:16Z")

</div>

The following errors: using DataFrames, GLM df = DataFrame(x1=\[1,2,3,4\], x2=\[1,2,3,4\], y=\[1,1,0,0\]) mdl = glm(@formula(y~x1+x2), df, Binomial(), LogitLink()) predict(mdl, df\[:, \[:x1, :x2\]\]) ERROR: LoadError: PosDef…

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

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