# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=138

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

**Page:** 139

---

## [How to trigger an event after rendering in a Bonito app](https://discourse.julialang.org/t/how-to-trigger-an-event-after-rendering-in-a-bonito-app/117912)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 6\
**Last updated:** [August 26, 2024, 9:54am UTC](https://discourse.julialang.org/t/how-to-trigger-an-event-after-rendering-in-a-bonito-app/117912 "2024-08-26T09:54:41Z")

</div>

With this little Bonito app, how can I call update\_cam! after the plot is rendered on the client? julia\> App() do session button = Button("reset cam") fig = Figure() ax = LScene(fig\[1, 1\]) …

---

## [Current, Maintained interactive Julia gui system? (mid 2024)](https://discourse.julialang.org/t/current-maintained-interactive-julia-gui-system-mid-2024/118318)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 17\
**Last updated:** [August 25, 2024, 5:45pm UTC](https://discourse.julialang.org/t/current-maintained-interactive-julia-gui-system-mid-2024/118318 "2024-08-25T17:45:18Z")

</div>

I am working with a collaborator on a statistical model. Part of the process at the moment is to find an initial condition for optimization or sampling. The model is complicated but there are a number of plots that we ca…

---

## [Warning when installing ModelingToolkit](https://discourse.julialang.org/t/warning-when-installing-modelingtoolkit/118586)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [August 25, 2024, 11:06am UTC](https://discourse.julialang.org/t/warning-when-installing-modelingtoolkit/118586 "2024-08-25T11:06:30Z")

</div>

If I install ModelingToolkit v9.33.1 using this script: #!/bin/bash -eu rm -rf /tmp/testdepot mkdir /tmp/testdepot rm -rf /tmp/test mkdir /tmp/test cd /tmp/test export JULIA\_DEPOT\_PATH=/tmp/testdepot julia --project="…

---

## [Vector to Matrix. How to do it generally](https://discourse.julialang.org/t/vector-to-matrix-how-to-do-it-generally/118579)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 2\
**Last updated:** [August 25, 2024, 9:25am UTC](https://discourse.julialang.org/t/vector-to-matrix-how-to-do-it-generally/118579 "2024-08-25T09:25:56Z")

</div>

I have a DataFrame, and I am creating a function that receives it, extracts a few columns and convert those columns into a matrix. I was using Matrix{T}(df) and it worked, but when the slected columns turn to be 1, it sa…

---

## [Why does substitute API in Symbolic.jl returns a tuple instead of a number?](https://discourse.julialang.org/t/why-does-substitute-api-in-symbolic-jl-returns-a-tuple-instead-of-a-number/118582)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 2\
**Last updated:** [August 25, 2024, 9:17am UTC](https://discourse.julialang.org/t/why-does-substitute-api-in-symbolic-jl-returns-a-tuple-instead-of-a-number/118582 "2024-08-25T09:17:47Z")

</div>

using Pkg Pkg.activate("/Users/ssiew/juliascript/Symbolics") using Symbolics # using Nemo # using SymbolicNumericIntegration @variables x expr = x println("expr is ",expr) answer = substitute.( expr, (Dict(x =\> 7),)…

---

## [Handling PyArray in Generic Functions: how to use \`similar\` and \`copy\` correctly](https://discourse.julialang.org/t/handling-pyarray-in-generic-functions-how-to-use-similar-and-copy-correctly/118569)

<div class="topic-metadata">

**Author:** [@mpf01](https://discourse.julialang.org/u/mpf01)\
**Replies:** 2\
**Last updated:** [August 25, 2024, 6:10am UTC](https://discourse.julialang.org/t/handling-pyarray-in-generic-functions-how-to-use-similar-and-copy-correctly/118569 "2024-08-25T06:10:55Z")

</div>

I’m working on making my functions generic to handle various types of arrays, including PyArray from PythonCall.jl. But I’ve encountered a problem with the similar function on PyArray types. Here’s a simple example that…

---

## [Warning installing OrdinaryDiffEq](https://discourse.julialang.org/t/warning-installing-ordinarydiffeq/118573)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [August 24, 2024, 9:58pm UTC](https://discourse.julialang.org/t/warning-installing-ordinarydiffeq/118573 "2024-08-24T21:58:06Z")

</div>

When installing OrdinaryDiffEq v6.88.0 I get the following warning: ┌ OrdinaryDiffEq │ WARNING: could not import OrdinaryDiffEqCore.strip\_interpolation into OrdinaryDiffEq Furthermore there seams to be a precompilatio…

---

## [Codecov.io and using packages not in the general registry](https://discourse.julialang.org/t/codecov-io-and-using-packages-not-in-the-general-registry/118488)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 1\
**Last updated:** [August 23, 2024, 6:40am UTC](https://discourse.julialang.org/t/codecov-io-and-using-packages-not-in-the-general-registry/118488 "2024-08-23T06:40:18Z")

</div>

I’ve created a package that uses another package which is not in the general registry. When the CI/coverage testing runs (github action) it fails, saying it expects the included package to be found in the general registr…

---

## [How to install OrdinaryDiffEq?](https://discourse.julialang.org/t/how-to-install-ordinarydiffeq/118572)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [August 24, 2024, 8:33pm UTC](https://discourse.julialang.org/t/how-to-install-ordinarydiffeq/118572 "2024-08-24T20:33:46Z")

</div>

I heard that this package was split into many smaller packages. How can I install less solvers? I only need: DFBDF DImplicitEuler KenCarp4 Any idea?

---

## [Rationale for dropmissing vs skipmissing](https://discourse.julialang.org/t/rationale-for-dropmissing-vs-skipmissing/118560)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 2\
**Last updated:** [August 24, 2024, 6:52pm UTC](https://discourse.julialang.org/t/rationale-for-dropmissing-vs-skipmissing/118560 "2024-08-24T18:52:55Z")

</div>

As outlined in How to remove rows containing missing from DataFrame? the way to get rid of missings in a DataFrame is to use dropmissing. This works really well and I use it all the time, but it bugs me that I cannot use…

---

## [Improving the performance of a spatial clustering model](https://discourse.julialang.org/t/improving-the-performance-of-a-spatial-clustering-model/118552)

<div class="topic-metadata">

**Author:** [@fmor](https://discourse.julialang.org/u/fmor)\
**Replies:** 8\
**Last updated:** [August 24, 2024, 5:48pm UTC](https://discourse.julialang.org/t/improving-the-performance-of-a-spatial-clustering-model/118552 "2024-08-24T17:48:36Z")

</div>

Hello, I am writing a statistical spatio-temporal model for clustering, using the target values Y\_{it} of the units, together with spatial coordinates {\\bf{s}}\_i and covariates {\\bf{x}}\_{it}. The choice of what to inclu…

---

## [Bitten by BLAS threading. Again. (Interaction w/ MPI.)](https://discourse.julialang.org/t/bitten-by-blas-threading-again-interaction-w-mpi/118533)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [August 24, 2024, 2:19pm UTC](https://discourse.julialang.org/t/bitten-by-blas-threading-again-interaction-w-mpi/118533 "2024-08-24T14:19:10Z")

</div>

I ran some MPI codes. On a Mac 2 Ultra (16 performance cores), and on a Grace+Grace system (two sockets, 72 cores each). The runs were carried out with 4 processes on a single machine (node). There was a weird mismatch …

---

## [Inline functions with default parameters](https://discourse.julialang.org/t/inline-functions-with-default-parameters/118548)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 6\
**Last updated:** [August 24, 2024, 1:58pm UTC](https://discourse.julialang.org/t/inline-functions-with-default-parameters/118548 "2024-08-24T13:58:06Z")

</div>

I have a doubt about default arguments. In the Functions documentation it says that I can use optional arguments aswell as defining a function with a simplyfied syntax of y(x)=x\*\*2, but can’t I have such a function with…

---

## [How to bypass the block for Julia on HTTP servers](https://discourse.julialang.org/t/how-to-bypass-the-block-for-julia-on-http-servers/118530)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 7\
**Last updated:** [August 24, 2024, 8:48am UTC](https://discourse.julialang.org/t/how-to-bypass-the-block-for-julia-on-http-servers/118530 "2024-08-24T08:48:08Z")

</div>

How to download html pages when the domain treats the query headers=\["User-Agent" =\> "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"\] HTTP.get(url, h…

---

## [Retrieve default values of keyword arguments](https://discourse.julialang.org/t/retrieve-default-values-of-keyword-arguments/19320)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 5\
**Last updated:** [August 23, 2024, 1:58pm UTC](https://discourse.julialang.org/t/retrieve-default-values-of-keyword-arguments/19320 "2024-08-23T13:58:16Z")

</div>

Sometimes I would find it useful to have access to the default values of keyword arguments of a function. I wrote this macro to achieve this for functions that I defined myself: julia\> macro kwvalues(func) …

---

## [How to get default values of a functions kwargs](https://discourse.julialang.org/t/how-to-get-default-values-of-a-functions-kwargs/66158)

<div class="topic-metadata">

**Author:** [@juliascrub](https://discourse.julialang.org/u/juliascrub)\
**Replies:** 2\
**Last updated:** [August 23, 2024, 12:01pm UTC](https://discourse.julialang.org/t/how-to-get-default-values-of-a-functions-kwargs/66158 "2024-08-23T12:01:56Z")

</div>

I have a function f: function f(; a=1, b=2, c=3) return 1 end I can get the names of its kwargs using: Base.kwarg\_decl.(methods(f))\[1\] Is there any way to get the default values of those kwargs?

---

## [Implicit numerical method using NLsolve.jl](https://discourse.julialang.org/t/implicit-numerical-method-using-nlsolve-jl/118525)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 3\
**Last updated:** [August 23, 2024, 11:13am UTC](https://discourse.julialang.org/t/implicit-numerical-method-using-nlsolve-jl/118525 "2024-08-23T11:13:33Z")

</div>

I would like to implement Lobatto IIIA-IIIB which is an implicit method. To do so, a non-linear equations need to be solved. Then I used NLsolve.jl for my problem using NLsolve function NuMethod(fV::Function,fT::Func…

---

## [Installing Gurobi pakage and artifact failure](https://discourse.julialang.org/t/installing-gurobi-pakage-and-artifact-failure/118527)

<div class="topic-metadata">

**Author:** [@Max12](https://discourse.julialang.org/u/Max12)\
**Replies:** 0\
**Last updated:** [August 23, 2024, 11:11am UTC](https://discourse.julialang.org/t/installing-gurobi-pakage-and-artifact-failure/118527 "2024-08-23T11:11:13Z")

</div>

Hi, I am encountering an issue while trying to install the Gurobi package in Julia. I have an academic license for Gurobi 11. Upon attempting to install the package, I receive the following error: ERROR: Unable to auto…

---

## [Error for solving ODEs by an implicit RK methods when using NLsolve.jl](https://discourse.julialang.org/t/error-for-solving-odes-by-an-implicit-rk-methods-when-using-nlsolve-jl/107764)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 1\
**Last updated:** [December 18, 2023, 9:36pm UTC](https://discourse.julialang.org/t/error-for-solving-odes-by-an-implicit-rk-methods-when-using-nlsolve-jl/107764 "2023-12-18T21:36:03Z")

</div>

Hi Guys!, I’m trying to an ODE system using implicit RK method. Defining the following system \\dot q\_i=p\_i,\\quad \\dot p\_i = -\\frac{q\_i}{||q||^3} and here q,p\\in \\mathbb R^3. I’m using this code using NLsolve function…

---

## [Problem with Turing.jl](https://discourse.julialang.org/t/problem-with-turing-jl/117413)

<div class="topic-metadata">

**Author:** [@Houda\_Yaq](https://discourse.julialang.org/u/Houda_Yaq)\
**Replies:** 5\
**Last updated:** [July 27, 2024, 9:11am UTC](https://discourse.julialang.org/t/problem-with-turing-jl/117413 "2024-07-27T09:11:30Z")

</div>

Hello everyone, I am trying to estimate parameters of a SDE system using Turing.jl package, but I keep running into this issue and I cannot figure out how to solve it. This is my code: using Turing using Plots using S…

---

## [Matrix of SVectors allocating](https://discourse.julialang.org/t/matrix-of-svectors-allocating/117670)

<div class="topic-metadata">

**Author:** [@vincentxwang](https://discourse.julialang.org/u/vincentxwang)\
**Replies:** 7\
**Last updated:** [August 2, 2024, 7:56pm UTC](https://discourse.julialang.org/t/matrix-of-svectors-allocating/117670 "2024-08-02T19:56:58Z")

</div>

Hi, I’m trying to multiply a matrix of Float64 by a matrix of SVectors, but I’m finding that mul! will take a while to allocate some memory for this, and I’m not sure why. Is there some way to get around this? using St…

---

## [Save user-defined input functions for different simulations](https://discourse.julialang.org/t/save-user-defined-input-functions-for-different-simulations/118461)

<div class="topic-metadata">

**Author:** [@clm](https://discourse.julialang.org/u/clm)\
**Replies:** 5\
**Last updated:** [August 22, 2024, 8:05pm UTC](https://discourse.julialang.org/t/save-user-defined-input-functions-for-different-simulations/118461 "2024-08-22T20:05:25Z")

</div>

I’m running a bunch of simulations, whose inputs and outputs I would like to save, where the user inputs are both numbers and functions. Currently, I save all of my inputs and outputs using JLD2. In a toy example of solv…

---

## [Error: Error during loading of extension SymbolicsForwardDiffExt of Symbolics](https://discourse.julialang.org/t/error-error-during-loading-of-extension-symbolicsforwarddiffext-of-symbolics/118313)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [August 22, 2024, 6:54pm UTC](https://discourse.julialang.org/t/error-error-during-loading-of-extension-symbolicsforwarddiffext-of-symbolics/118313 "2024-08-22T18:54:53Z")

</div>

I am getting the following error when installing my project Tethers.jl: 283 dependencies successfully precompiled in 295 seconds. 9 already precompiled. 2 dependencies had output during precompilation: ┌ Symbolics →…

---

## [Broadcasting on views](https://discourse.julialang.org/t/broadcasting-on-views/118459)

<div class="topic-metadata">

**Author:** [@pratikvn](https://discourse.julialang.org/u/pratikvn)\
**Replies:** 2\
**Last updated:** [August 22, 2024, 11:22am UTC](https://discourse.julialang.org/t/broadcasting-on-views/118459 "2024-08-22T11:22:45Z")

</div>

Hello, I would like to perform a broadcast operation on views with indices stored in a struct. I am not sure how exactly to acheive this with Julia syntax. Essentially I have a struct like so: struct Foo id::Inte…

---

## [How do I convert a large Array to a StaticArray](https://discourse.julialang.org/t/how-do-i-convert-a-large-array-to-a-staticarray/118454)

<div class="topic-metadata">

**Author:** [@lupemba](https://discourse.julialang.org/u/lupemba)\
**Replies:** 8\
**Last updated:** [August 22, 2024, 8:39am UTC](https://discourse.julialang.org/t/how-do-i-convert-a-large-array-to-a-staticarray/118454 "2024-08-22T08:39:10Z")

</div>

What is the best way to convert a larger array to a StaticArray. I have tried the following which works fine for a small array but not for a medium size. using StaticArrays # this works A1 = zeros(UInt16, (3, 4, 5)); @…

---

## [How to use OffsetArray with CUDA](https://discourse.julialang.org/t/how-to-use-offsetarray-with-cuda/118400)

<div class="topic-metadata">

**Author:** [@0samuraiE](https://discourse.julialang.org/u/0samuraiE)\
**Replies:** 8\
**Last updated:** [August 21, 2024, 11:58pm UTC](https://discourse.julialang.org/t/how-to-use-offsetarray-with-cuda/118400 "2024-08-21T23:58:41Z")

</div>

Hello all. In the following code, sum returns ERROR: Scalar indexing is disallowed. How should sum be dispatched or How should I do? A = OffsetArray(CUDA.rand(10), -4:5); a = @views A\[-1:2\]; sum(a)

---

## [There is a Problem with Minimum function, can any one help me?](https://discourse.julialang.org/t/there-is-a-problem-with-minimum-function-can-any-one-help-me/87628)

<div class="topic-metadata">

**Author:** [@Alireza\_yousefi](https://discourse.julialang.org/u/Alireza_yousefi)\
**Replies:** 4\
**Last updated:** [September 22, 2022, 12:05pm UTC](https://discourse.julialang.org/t/there-is-a-problem-with-minimum-function-can-any-one-help-me/87628 "2022-09-22T12:05:49Z")

</div>

I wanna find the min & max of a column of a matrix. I use minimum function, but I have below problem, anyone know what happen? thanks

---

## [Understanding multiple dispatch](https://discourse.julialang.org/t/understanding-multiple-dispatch/76601)

<div class="topic-metadata">

**Author:** [@how](https://discourse.julialang.org/u/how)\
**Replies:** 30\
**Last updated:** [August 21, 2024, 9:00pm UTC](https://discourse.julialang.org/t/understanding-multiple-dispatch/76601 "2024-08-21T21:00:41Z")

</div>

Hi, I am studying Multiple dispatch, and have some troubles. While studying Julia language, I understood that Multiple dispatch is something that selecting which method to be applied based on the argument’s type. In t…

---

## [Why does logging (@info) create a race condition?](https://discourse.julialang.org/t/why-does-logging-info-create-a-race-condition/118428)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 2\
**Last updated:** [August 21, 2024, 2:03pm UTC](https://discourse.julialang.org/t/why-does-logging-info-create-a-race-condition/118428 "2024-08-21T14:03:10Z")

</div>

I have a directory with compressed CSVs that I’m reading in parallel. Roughly like so, simplifying away domain specific details not relevant to the question: function munge\_csv(stream) ...read a CSV with CSV.read, m…

---

## [Julia in vscode keeps precompiling compiled packages](https://discourse.julialang.org/t/julia-in-vscode-keeps-precompiling-compiled-packages/117998)

<div class="topic-metadata">

**Author:** [@maxfreu](https://discourse.julialang.org/u/maxfreu)\
**Replies:** 11\
**Last updated:** [August 21, 2024, 1:45pm UTC](https://discourse.julialang.org/t/julia-in-vscode-keeps-precompiling-compiled-packages/117998 "2024-08-21T13:45:06Z")

</div>

Hi! I have a serious issue that currently keeps me from redoing the figures for my publication. I’m working with vscode on our cluster head node with julia 1.10.4. When I open vscode and import / use modules at the star…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=137)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=139)
