# Latest

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

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

**Page:** 1448

---

## [Manual dispatch over a constant type set](https://discourse.julialang.org/t/manual-dispatch-over-a-constant-type-set/57811)

<div class="topic-metadata">

**Author:** [@RGon](https://discourse.julialang.org/u/RGon)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 10:01pm UTC](https://discourse.julialang.org/t/manual-dispatch-over-a-constant-type-set/57811 "2021-03-24T22:01:09Z")

</div>

I’m trying to run a simulation that has many different thermodynamic methods depending on the substance type (usually phase), and it’s nice to be able to easily choose what method to use. Long story short, I need to be a…

---

## [ComponentArrays.jl with NLopt.jl](https://discourse.julialang.org/t/componentarrays-jl-with-nlopt-jl/57482)

<div class="topic-metadata">

**Author:** [@avonmoll](https://discourse.julialang.org/u/avonmoll)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 2:08pm UTC](https://discourse.julialang.org/t/componentarrays-jl-with-nlopt-jl/57482 "2021-03-24T14:08:38Z")

</div>

These two packages seem to be incompatible. Without fully understanding the internals of NLopt.jl it seems that the vector of optimization variables ends up getting cast as an Array{Float64,1}. This basic snippet works: …

---

## [Multivariate Distributions & Parameter Inference](https://discourse.julialang.org/t/multivariate-distributions-parameter-inference/57896)

<div class="topic-metadata">

**Author:** [@willsharpless](https://discourse.julialang.org/u/willsharpless)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 9:52pm UTC](https://discourse.julialang.org/t/multivariate-distributions-parameter-inference/57896 "2021-03-24T21:52:30Z")

</div>

Hi all, I was trying to adapt the example from this tutorial on parameter inference to a generalized Lotka-Volterra model with n equations when I ran into some issues. In order to write multivariate distributions into …

---

## [Error performing update in REPL pkg mode](https://discourse.julialang.org/t/error-performing-update-in-repl-pkg-mode/57892)

<div class="topic-metadata">

**Author:** [@Karl](https://discourse.julialang.org/u/Karl)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 9:12pm UTC](https://discourse.julialang.org/t/error-performing-update-in-repl-pkg-mode/57892 "2021-03-24T21:12:49Z")

</div>

Hi all, I am very new to Julia as well as to Discourse. I am trying to set up an environment to learn the language. I just downloaded the V1.5.4 binary from julialang.org and installed it as a user (not admin). I la…

---

## [Difficulty installing packages with JuliaPro](https://discourse.julialang.org/t/difficulty-installing-packages-with-juliapro/57813)

<div class="topic-metadata">

**Author:** [@Adam\_D](https://discourse.julialang.org/u/Adam_D)\
**Replies:** 19\
**Last updated:** [March 24, 2021, 9:06pm UTC](https://discourse.julialang.org/t/difficulty-installing-packages-with-juliapro/57813 "2021-03-24T21:06:23Z")

</div>

Hey! I tried to install your package by " pkg\> add “GitHub - oxinabox/ProjectManagement.jl: Project Management tools, with a particular focus on PERT charts”" but I keep getting this error: “ERROR: failed to clone from…

---

## [Using packages installed as dependencies](https://discourse.julialang.org/t/using-packages-installed-as-dependencies/17604)

<div class="topic-metadata">

**Author:** [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 9:06pm UTC](https://discourse.julialang.org/t/using-packages-installed-as-dependencies/17604 "2021-03-24T21:06:04Z")

</div>

I have DataFrames installed, and as a dependency of that, StatsBase as well. I assumed that StatsBase was available to use as a package of its own. But using StatsBase fails “not found in current path” error. After some…

---

## [How to lock variables in @threads](https://discourse.julialang.org/t/how-to-lock-variables-in-threads/57697)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 11\
**Last updated:** [March 24, 2021, 8:56pm UTC](https://discourse.julialang.org/t/how-to-lock-variables-in-threads/57697 "2021-03-24T20:56:03Z")

</div>

I am running a multithreaded parameter tuning for some ML algorithms. I can avoid allocation in the input using CartesianIndices (thanks, stevengj !) but how can I avoid allocation in the output ? I would likely need to…

---

## [Random number flow independent from the number of threads](https://discourse.julialang.org/t/random-number-flow-independent-from-the-number-of-threads/57850)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 8:50pm UTC](https://discourse.julialang.org/t/random-number-flow-independent-from-the-number-of-threads/57850 "2021-03-24T20:50:20Z")

</div>

I am still trying to arrive to a workflow where I can set some multithreaded experiment random or fixed given some input depending of the needs. The code above works for a given (fixed) number of threads, but if I let c…

---

## [Pkg add - action at a distance](https://discourse.julialang.org/t/pkg-add-action-at-a-distance/57886)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 8:48pm UTC](https://discourse.julialang.org/t/pkg-add-action-at-a-distance/57886 "2021-03-24T20:48:17Z")

</div>

I did: (@v1.6) pkg\> add BPFnative \[..\] \[856f044c\] ↓ MKL\_jll v2021.1.1+1 ⇒ v2020.2.254+0 \[da04e1cc\] ↑ MPI v0.16.1 ⇒ v0.17.1 and even with it, I think, installed before to the same version, I got lots of upgrades for…

---

## [ModelingToolkit's structural\_simplify fails on LI-cutset simplification](https://discourse.julialang.org/t/modelingtoolkits-structural-simplify-fails-on-li-cutset-simplification/57852)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 8:42pm UTC](https://discourse.julialang.org/t/modelingtoolkits-structural-simplify-fails-on-li-cutset-simplification/57852 "2021-03-24T20:42:42Z")

</div>

I modified the example on acausal component modelling from ModelingToolkit and I get internal tearing error. In my modification I have a series connected V+R+L+L circuit. The series connection of inductors/current sourc…

---

## [Array indexing with multiple conditions](https://discourse.julialang.org/t/array-indexing-with-multiple-conditions/57872)

<div class="topic-metadata">

**Author:** [@newb\_gk](https://discourse.julialang.org/u/newb_gk)\
**Replies:** 4\
**Last updated:** [March 24, 2021, 8:29pm UTC](https://discourse.julialang.org/t/array-indexing-with-multiple-conditions/57872 "2021-03-24T20:29:51Z")

</div>

I have a two-dimensional array and I want to select based on the values in certain columns. For example, let’s think of data to be an 1000x14 Array{Float64,2}. I can do data\[data\[:,3\].\>-9.0,:\] but when I do data\[data\[…

---

## [\[ANN\] OpticSim.jl optical simulation package released](https://discourse.julialang.org/t/ann-opticsim-jl-optical-simulation-package-released/57798)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 7\
**Last updated:** [March 24, 2021, 7:51pm UTC](https://discourse.julialang.org/t/ann-opticsim-jl-optical-simulation-package-released/57798 "2021-03-24T19:51:17Z")

</div>

OpticSim.jl (GitHub - microsoft/OpticSim.jl: Optical Simulation software) is a package for simulation and optimization of complex optical systems developed by the Microsoft Research Interactive Media Group and the Micro…

---

## [TypeError when using Symbolics.jl with Polynomials.jl](https://discourse.julialang.org/t/typeerror-when-using-symbolics-jl-with-polynomials-jl/57842)

<div class="topic-metadata">

**Author:** [@jbu](https://discourse.julialang.org/u/jbu)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 7:48pm UTC](https://discourse.julialang.org/t/typeerror-when-using-symbolics-jl-with-polynomials-jl/57842 "2021-03-24T19:48:26Z")

</div>

I’m new to the Symbolics.jl package, and I’m currently trying to use it in combination with other packages. However I keep getting the error ERROR: TypeError: non-boolean (Num) used in boolean context when I try to use s…

---

## [Custom likelihood function optimization](https://discourse.julialang.org/t/custom-likelihood-function-optimization/57849)

<div class="topic-metadata">

**Author:** [@ocolluphid](https://discourse.julialang.org/u/ocolluphid)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 7:46pm UTC](https://discourse.julialang.org/t/custom-likelihood-function-optimization/57849 "2021-03-24T19:46:36Z")

</div>

Hi, I’m having trouble with this likelihood maximization problem. My likelihood function “works” when I call it with some random parameters (i.e. it outputs a likelihood value) but when I pass it through the Optim.jl pa…

---

## [EzXML node question](https://discourse.julialang.org/t/ezxml-node-question/57277)

<div class="topic-metadata">

**Author:** [@matianhe3](https://discourse.julialang.org/u/matianhe3)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 6:36pm UTC](https://discourse.julialang.org/t/ezxml-node-question/57277 "2021-03-24T18:36:24Z")

</div>

file = readxml("f0dc19ff.xml") nums = findall("//TT", file) for num in nums counter = findall("//contour", num)) println(length(counter)) \<TT\>\<contour\>\</contour\>\</TT\> \<TT\>\<contour\>\</contour\>\</…

---

## [Connect Subtree on a Tree LightGraphs](https://discourse.julialang.org/t/connect-subtree-on-a-tree-lightgraphs/57875)

<div class="topic-metadata">

**Author:** [@afazevedo](https://discourse.julialang.org/u/afazevedo)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 5:29pm UTC](https://discourse.julialang.org/t/connect-subtree-on-a-tree-lightgraphs/57875 "2021-03-24T17:29:10Z")

</div>

Good afternoon everybody. In my work, i need to disconnect subtrees from my graph and connect elsewhere. My question is whether in the LightGraphs package, or in another package, is there an easy way to do this? In the…

---

## [Execution hangs indefinitely when trying to access QR factor](https://discourse.julialang.org/t/execution-hangs-indefinitely-when-trying-to-access-qr-factor/57881)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 0\
**Last updated:** [March 24, 2021, 5:10pm UTC](https://discourse.julialang.org/t/execution-hangs-indefinitely-when-trying-to-access-qr-factor/57881 "2021-03-24T17:10:54Z")

</div>

The Qr factorization of an NXL matrix does not produce a NXL orthogonal matrix Q but an NXN matrix. When I try to access the first L columns, the execution hangs indefinitely. using ArnoldiMethod; using LinearAlgebra; L…

---

## [New to Julia, using it for dynamic systems simulations](https://discourse.julialang.org/t/new-to-julia-using-it-for-dynamic-systems-simulations/55285)

<div class="topic-metadata">

**Author:** [@Babou](https://discourse.julialang.org/u/Babou)\
**Replies:** 14\
**Last updated:** [March 24, 2021, 5:09pm UTC](https://discourse.julialang.org/t/new-to-julia-using-it-for-dynamic-systems-simulations/55285 "2021-03-24T17:09:02Z")

</div>

Hi all, I am a new Julia user. I am going to be using it to run some toy simulations of biologically realistic neural networks. If you aren’t familiar with this topic have a peak here.I saw DifferentialEquations.jl an…

---

## [Invoke different method for callable struct / How to emulate pythons \`super()\`](https://discourse.julialang.org/t/invoke-different-method-for-callable-struct-how-to-emulate-pythons-super/57869)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 4\
**Last updated:** [March 24, 2021, 5:01pm UTC](https://discourse.julialang.org/t/invoke-different-method-for-callable-struct-how-to-emulate-pythons-super/57869 "2021-03-24T17:01:46Z")

</div>

I have a parametric function as discussed here and now want to generate another such function type that logs its arguments while invoking the non-logging method for the computation. How do I use invoke to dispatch on the…

---

## [Filing an issue or PR on a package in stdlib](https://discourse.julialang.org/t/filing-an-issue-or-pr-on-a-package-in-stdlib/57876)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 4:28pm UTC](https://discourse.julialang.org/t/filing-an-issue-or-pr-on-a-package-in-stdlib/57876 "2021-03-24T16:28:53Z")

</div>

Is there any special protocol for filing an issue or submitting a PR on a package in stdlib? I recently encountered a problem in SparseArrays/src/linalg.jl with, I think, a pretty simple fix. Do I just create an issue …

---

## [How to Put Sublists into Docstrings?](https://discourse.julialang.org/t/how-to-put-sublists-into-docstrings/57843)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 2:36pm UTC](https://discourse.julialang.org/t/how-to-put-sublists-into-docstrings/57843 "2021-03-24T14:36:41Z")

</div>

Hi all, I was reviewing a PR recently and was trying to correct a small error in their docstring. Here is the docstring: """ latex(text::LaTeXString, pos::Point, object::Symbol; valign::Symbol = :top, halign::Symbo…

---

## [How does a dictionary store structs?](https://discourse.julialang.org/t/how-does-a-dictionary-store-structs/57866)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 1:53pm UTC](https://discourse.julialang.org/t/how-does-a-dictionary-store-structs/57866 "2021-03-24T13:53:29Z")

</div>

Consider for a moment the following structs: abstract type AbstractTransport end struct Warp limit::Float32 end struct Galaxy \<:AbstractTransport name::String drive::Warp end struct Intrepid \<:AbstractTra…

---

## [Generating HTML Code Coverage in Azure DevOps](https://discourse.julialang.org/t/generating-html-code-coverage-in-azure-devops/57870)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 0\
**Last updated:** [March 24, 2021, 2:16pm UTC](https://discourse.julialang.org/t/generating-html-code-coverage-in-azure-devops/57870 "2021-03-24T14:16:11Z")

</div>

How can I generate HTML Code Coverage Report for my git repository in AZURE DevOps? Is it possible with some kind of plugin?

---

## [Iterating over several arrays](https://discourse.julialang.org/t/iterating-over-several-arrays/57857)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 14\
**Last updated:** [March 24, 2021, 2:02pm UTC](https://discourse.julialang.org/t/iterating-over-several-arrays/57857 "2021-03-24T14:02:00Z")

</div>

Hi! Say I have 2 arrays: a=rand(3); b=rand(4); and I want to iterate over both of them for i in 1:7 do stuff on ab\[i\] end what’s a good way of doing that? The obvious way is ab = vcat(a,b), but that is creating a …

---

## [How Do I Add a Colorbar to a Choropleth Map?](https://discourse.julialang.org/t/how-do-i-add-a-colorbar-to-a-choropleth-map/57814)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 1:47pm UTC](https://discourse.julialang.org/t/how-do-i-add-a-colorbar-to-a-choropleth-map/57814 "2021-03-24T13:47:54Z")

</div>

Hi all, I have a choropleth plot that I have made using the following code snippet: choropleth = plot(states.geometry, axis = (\[\], false); fillcolor = permutedims(random\_values)) It comes out looking like this: How…

---

## [Plotting multiple figures using Plots.jl](https://discourse.julialang.org/t/plotting-multiple-figures-using-plots-jl/57859)

<div class="topic-metadata">

**Author:** [@Marca85](https://discourse.julialang.org/u/Marca85)\
**Replies:** 6\
**Last updated:** [March 24, 2021, 1:39pm UTC](https://discourse.julialang.org/t/plotting-multiple-figures-using-plots-jl/57859 "2021-03-24T13:39:46Z")

</div>

Hi, I would like to run a script in Visual Studio Code that plot different graphs in multiple figures (multiple windows, not multiple subplots). using Plots x = 1:10 plot(x,x, label="linear") plot(x,x.^2, label="quadr…

---

## [Automated semantic analysis and modification of Julia code](https://discourse.julialang.org/t/automated-semantic-analysis-and-modification-of-julia-code/57267)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 4\
**Last updated:** [March 24, 2021, 11:16am UTC](https://discourse.julialang.org/t/automated-semantic-analysis-and-modification-of-julia-code/57267 "2021-03-24T11:16:53Z")

</div>

Is there a package or tool available that allows to automate the semantic analysis and modification of Julia code, e.g., in a file or in an entire module? I am thinking about use cases like where we have lots of code wit…

---

## [Does ForwardDiff work with Python functions?](https://discourse.julialang.org/t/does-forwarddiff-work-with-python-functions/57851)

<div class="topic-metadata">

**Author:** [@arif](https://discourse.julialang.org/u/arif)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 10:29am UTC](https://discourse.julialang.org/t/does-forwarddiff-work-with-python-functions/57851 "2021-03-24T10:29:27Z")

</div>

Hi all, trying to use ForwardDiff on a Python function and getting errors. Here is a MWE using PyCall np = pyimport("numpy") function npsin(x) np.sin(x) end function dnpsin(x) ForwardDiff.derivative(npsin, x) …

---

## [Location of juliarc.jl file](https://discourse.julialang.org/t/location-of-juliarc-jl-file/56339)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 8:57am UTC](https://discourse.julialang.org/t/location-of-juliarc-jl-file/56339 "2021-03-24T08:57:29Z")

</div>

Based on this, from the Plots.jl docs : I was wondering where the juliarc.jl file is located. I am starting to suspect that I actually want to make changes in the startup.jl-file, but I would also be surprised if the…

---

## [PackageCompiler not compiles some statements](https://discourse.julialang.org/t/packagecompiler-not-compiles-some-statements/57803)

<div class="topic-metadata">

**Author:** [@Vangelis](https://discourse.julialang.org/u/Vangelis)\
**Replies:** 0\
**Last updated:** [March 23, 2021, 5:20pm UTC](https://discourse.julialang.org/t/packagecompiler-not-compiles-some-statements/57803 "2021-03-23T17:20:07Z")

</div>

Hi, I am trying to build a system image for the (simple) module below: module TestCatAF function myfunc(m1, m2) return cat(m1, m2, dims=(1,2)) end Base.@ccallable function call\_myfunc()::Cdouble M1 = …

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

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