# General Usage

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

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

**Page:** 234

---

## [Easiest way to pkg add a pull request?](https://discourse.julialang.org/t/easiest-way-to-pkg-add-a-pull-request/76755)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 10\
**Last updated:** [November 1, 2023, 4:16pm UTC](https://discourse.julialang.org/t/easiest-way-to-pkg-add-a-pull-request/76755 "2023-11-01T16:16:53Z")

</div>

What is the fastest way to \] add a pull request of a package? For example, if someone has contributed a fix to a package that I want to quickly test out, but that has not yet been merged.

---

## [Using Matlab from Julia](https://discourse.julialang.org/t/using-matlab-from-julia/105451)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 10\
**Last updated:** [November 1, 2023, 2:47pm UTC](https://discourse.julialang.org/t/using-matlab-from-julia/105451 "2023-11-01T14:47:43Z")

</div>

I am testing the package MATLAB.jl. This works: using MATLAB mat"1+1" This doesn’t work: julia\> mat"tf(\[1\],\[1,1\])" ERROR: ArgumentError: Unsupported kind of variable. Stacktrace: \[1\] jvalue(mx::MxArray) @ MATLAB …

---

## [SlickEdit?](https://discourse.julialang.org/t/slickedit/105271)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 1\
**Last updated:** [November 1, 2023, 9:06am UTC](https://discourse.julialang.org/t/slickedit/105271 "2023-11-01T09:06:14Z")

</div>

Any users of SlickEditor? Google claims it’s quite impressive, but the cost is somewhat steep. I’m curious if anyone might endorse it? Thanks.

---

## [Passing DataFrame with \`|\>\` to anonymous function changing size?](https://discourse.julialang.org/t/passing-dataframe-with-to-anonymous-function-changing-size/105300)

<div class="topic-metadata">

**Author:** [@hungpham3112](https://discourse.julialang.org/u/hungpham3112)\
**Replies:** 1\
**Last updated:** [November 1, 2023, 9:02am UTC](https://discourse.julialang.org/t/passing-dataframe-with-to-anonymous-function-changing-size/105300 "2023-11-01T09:02:52Z")

</div>

What I am doing is redirect the dataset through pipeline operator to show the 6 first lines. There is two difference versions below: Version 1: train\_df\_dropped = hcat(select(train\_df, Not(:type)), df) first(train\_df\_d…

---

## [Could not load library "libGR.dll"](https://discourse.julialang.org/t/could-not-load-library-libgr-dll/105644)

<div class="topic-metadata">

**Author:** [@jameshu](https://discourse.julialang.org/u/jameshu)\
**Replies:** 0\
**Last updated:** [November 1, 2023, 7:20am UTC](https://discourse.julialang.org/t/could-not-load-library-libgr-dll/105644 "2023-11-01T07:20:09Z")

</div>

The Julia-1.9.3 environment is good to run, “Plots.GRBackend()” displayed. But in the Jupyter notebook when running “Plots.Plot” function, the following errors are found as could not load library “libGR.dll” The spe…

---

## [How to get numerator and denominator](https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [October 31, 2023, 5:31pm UTC](https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623 "2023-10-31T17:31:56Z")

</div>

I need to do a lot of symbolic math processing these days. First question: How can a spit an expression in nominator and denominator? using Symbolics @variables R a b c d y = (2a+3b)/(4R - 3d) # den= # num=

---

## [Good Julia function / algorithm idea to find the nearest node to a given point location based on some given road network (for example, open street map data)?](https://discourse.julialang.org/t/good-julia-function-algorithm-idea-to-find-the-nearest-node-to-a-given-point-location-based-on-some-given-road-network-for-example-open-street-map-data/22787)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 12\
**Last updated:** [October 31, 2023, 4:55pm UTC](https://discourse.julialang.org/t/good-julia-function-algorithm-idea-to-find-the-nearest-node-to-a-given-point-location-based-on-some-given-road-network-for-example-open-street-map-data/22787 "2023-10-31T16:55:16Z")

</div>

Hello. In python, we have the nice function to get the nearest node to a given point location using the osmnx package as the following. import osmnx as ox ox.config(log\_console=True, use\_cache=True) G = ox.graph\_from…

---

## [Any package or provision to suggest alternative/fast code](https://discourse.julialang.org/t/any-package-or-provision-to-suggest-alternative-fast-code/105610)

<div class="topic-metadata">

**Author:** [@VinodV](https://discourse.julialang.org/u/VinodV)\
**Replies:** 4\
**Last updated:** [October 31, 2023, 3:56pm UTC](https://discourse.julialang.org/t/any-package-or-provision-to-suggest-alternative-fast-code/105610 "2023-10-31T15:56:38Z")

</div>

Suppose I have written a piece of code to check whether a string say “malayalam” is a palindrome. s = "malayalam" s == reverse(a) . An alternative is s == s\[end:-1:1\]. Is there a package or provision to suggest alter…

---

## [Documenter error \[:cross\_references\]](https://discourse.julialang.org/t/documenter-error-cross-references/105533)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 15\
**Last updated:** [October 31, 2023, 4:01pm UTC](https://discourse.julialang.org/t/documenter-error-cross-references/105533 "2023-10-31T16:01:24Z")

</div>

I’d try to add a list of units and constants to Unitful - s. issue 623 (filed by @rafaqz). AFAIU currently the only way to find the symbol used is to look into the source code of pkgdefaults.jl The references are to be …

---

## [How To Properly Use Unitful](https://discourse.julialang.org/t/how-to-properly-use-unitful/40295)

<div class="topic-metadata">

**Author:** [@acdupont](https://discourse.julialang.org/u/acdupont)\
**Replies:** 13\
**Last updated:** [October 31, 2023, 2:58pm UTC](https://discourse.julialang.org/t/how-to-properly-use-unitful/40295 "2023-10-31T14:58:36Z")

</div>

I’m using Unitful for the first time and would like direction on the proper way to use it. For my use case, I am creating a struct that I would like to store a specific unit because the value is being passed to such thin…

---

## [Symbolics.jl problem trying to use solve\_for](https://discourse.julialang.org/t/symbolics-jl-problem-trying-to-use-solve-for/105319)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 4\
**Last updated:** [October 31, 2023, 2:12pm UTC](https://discourse.julialang.org/t/symbolics-jl-problem-trying-to-use-solve-for/105319 "2023-10-31T14:12:33Z")

</div>

I’m learning how to use Symbolcs.jl. My current work involves lines and vectors in three dimensional space. At the suggestion of, I think Shash, at a CAJUN about a month ago, since the Symbolics variables as introduced…

---

## [What is the correction factor for weighted variance](https://discourse.julialang.org/t/what-is-the-correction-factor-for-weighted-variance/105615)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [October 31, 2023, 1:26pm UTC](https://discourse.julialang.org/t/what-is-the-correction-factor-for-weighted-variance/105615 "2023-10-31T13:26:32Z")

</div>

Hi all, What is the formula for the correction factor for a weighted variance? Example: using StatsBase v = \[1,2,3\] p = \[.3,.5,.2\] std(v, ProbabilityWeights(p); corrected=true) Thanks!

---

## [Implementation of the Lagrangian formalism using Julia](https://discourse.julialang.org/t/implementation-of-the-lagrangian-formalism-using-julia/89502)

<div class="topic-metadata">

**Author:** [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Replies:** 14\
**Last updated:** [October 31, 2023, 11:57am UTC](https://discourse.julialang.org/t/implementation-of-the-lagrangian-formalism-using-julia/89502 "2023-10-31T11:57:26Z")

</div>

Hi, I am a newcomer to Julia and I am specifically interested in applying Julia to physics problems. I have already worked through differential equations and plotting and stuff, and I am quite drawn by the language and h…

---

## [Storing and accessing large jagged array with julia](https://discourse.julialang.org/t/storing-and-accessing-large-jagged-array-with-julia/45973)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 33\
**Last updated:** [October 31, 2023, 11:10am UTC](https://discourse.julialang.org/t/storing-and-accessing-large-jagged-array-with-julia/45973 "2023-10-31T11:10:50Z")

</div>

I have a bunch of data, currently stored in 2000 seperate .csv files. Each file countains thousands of events, where each event starts with three numbers, one of which specifies the length of the event. All following row…

---

## [DifferentialEquations Package](https://discourse.julialang.org/t/differentialequations-package/105599)

<div class="topic-metadata">

**Author:** [@Andrej\_Ranisavljevic](https://discourse.julialang.org/u/Andrej_Ranisavljevic)\
**Replies:** 2\
**Last updated:** [October 31, 2023, 10:14am UTC](https://discourse.julialang.org/t/differentialequations-package/105599 "2023-10-31T10:14:24Z")

</div>

Has anyone encountered errors while precompiling DifferentialEquations package in julia v1.9.3 release? For some reason i can’t manage to install it and get “Failed to precompile” error everytime. I have tried to delet…

---

## [Unpacking of variables that do not exist](https://discourse.julialang.org/t/unpacking-of-variables-that-do-not-exist/105575)

<div class="topic-metadata">

**Author:** [@johannesnauta](https://discourse.julialang.org/u/johannesnauta)\
**Replies:** 11\
**Last updated:** [October 31, 2023, 9:08am UTC](https://discourse.julialang.org/t/unpacking-of-variables-that-do-not-exist/105575 "2023-10-31T09:08:46Z")

</div>

I am trying to optimise Catalyst code by omitting many reactions as their rates will, eventually, be put to zero. Briefly, I am considering systems of which many possible reactions will have a rate of 0. To avoid creatin…

---

## [Where does this allocation pattern come from?](https://discourse.julialang.org/t/where-does-this-allocation-pattern-come-from/105606)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 3\
**Last updated:** [October 31, 2023, 9:07am UTC](https://discourse.julialang.org/t/where-does-this-allocation-pattern-come-from/105606 "2023-10-31T09:07:45Z")

</div>

When I execute the following code, I get some interesting pattern: x = collect(1:1000) x\[1\] @showtime x\[511\] @showtime x\[511\] @showtime x\[511\] @showtime x\[512\] @showtime x\[512\] @showtime x\[512\] @showtime x\[511\] @showtim…

---

## [Help find best approach to streaming data on raspberry pi](https://discourse.julialang.org/t/help-find-best-approach-to-streaming-data-on-raspberry-pi/105130)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 16\
**Last updated:** [October 31, 2023, 5:47am UTC](https://discourse.julialang.org/t/help-find-best-approach-to-streaming-data-on-raspberry-pi/105130 "2023-10-31T05:47:22Z")

</div>

I am trying to do some complicated asynchronous and preferably multiheaded operations on a Raspberry Pi. I have some ideas, but could really use some pointers on how to tackle problem. I will outline the approached I hav…

---

## [Accessing a ComponentArray's fields in a type-stable manner](https://discourse.julialang.org/t/accessing-a-componentarrays-fields-in-a-type-stable-manner/103832)

<div class="topic-metadata">

**Author:** [@Bizzi](https://discourse.julialang.org/u/Bizzi)\
**Replies:** 2\
**Last updated:** [October 31, 2023, 3:53am UTC](https://discourse.julialang.org/t/accessing-a-componentarrays-fields-in-a-type-stable-manner/103832 "2023-10-31T03:53:15Z")

</div>

I’m struggling with iterating over the named fields of a ComponentArray in a compiler-friendly way. Take the following MWE, emulating some Neural Network: I create the nested structure layers, containing some weight …

---

## [Can I dispatch on (mathematical) functions?](https://discourse.julialang.org/t/can-i-dispatch-on-mathematical-functions/105577)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 15\
**Last updated:** [October 31, 2023, 2:20am UTC](https://discourse.julialang.org/t/can-i-dispatch-on-mathematical-functions/105577 "2023-10-31T02:20:33Z")

</div>

Hi, TLDR: Is it possible to dispatch on (mathematical) functions ? Broad context and reasons I am asking thisIn this (just registered) package GitHub - lrnv/WilliamsonTransforms.jl I implemented a bijective mapping bet…

---

## [Truncating BigFloat](https://discourse.julialang.org/t/truncating-bigfloat/105578)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 6\
**Last updated:** [October 31, 2023, 1:07am UTC](https://discourse.julialang.org/t/truncating-bigfloat/105578 "2023-10-31T01:07:59Z")

</div>

During computing, I need to truncate some BigFloat results (still to BigFloat, just with less precision) to save memory. Is there a way to truncate BigFloat without changing the global precision?

---

## [Using an assignment outside of threaded for loop degraded performance by a huge amount](https://discourse.julialang.org/t/using-an-assignment-outside-of-threaded-for-loop-degraded-performance-by-a-huge-amount/105552)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 10\
**Last updated:** [October 30, 2023, 11:51pm UTC](https://discourse.julialang.org/t/using-an-assignment-outside-of-threaded-for-loop-degraded-performance-by-a-huge-amount/105552 "2023-10-30T23:51:05Z")

</div>

I created an MWE for this question, in practice the only difference between the fs functions is that T = Int is introduced in different scopes, however the first two versions are very slow: using Base.Threads: @threads,…

---

## [JET reports tons of "runtime dispatch detected:" when using \`Statistics.cov\`](https://discourse.julialang.org/t/jet-reports-tons-of-runtime-dispatch-detected-when-using-statistics-cov/105600)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 11:06pm UTC](https://discourse.julialang.org/t/jet-reports-tons-of-runtime-dispatch-detected-when-using-statistics-cov/105600 "2023-10-30T23:06:43Z")

</div>

And it’s much worse in 1.10 A type stability issue? using JET using Statistics @report\_opt cov(rand(10,3)) ═════ 32 possible errors found ═════ ┌ cov(X::Matrix{Float64}) @ Statistics C:\\workdir\\usr\\share\\julia\\stdlib\\…

---

## [Replacing Variable Name with a String in a Julia Macro](https://discourse.julialang.org/t/replacing-variable-name-with-a-string-in-a-julia-macro/105579)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 1\
**Last updated:** [October 30, 2023, 5:07pm UTC](https://discourse.julialang.org/t/replacing-variable-name-with-a-string-in-a-julia-macro/105579 "2023-10-30T17:07:19Z")

</div>

I’m working on a project where I need to create a macro in Julia that takes a Julia code expression, a variable name, and a string as input and returns the same expression with the specified variable name replaced by the…

---

## [How Does Compat Requirement Changes for General Registry Affect Package Maintainers?](https://discourse.julialang.org/t/how-does-compat-requirement-changes-for-general-registry-affect-package-maintainers/104960)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 17\
**Last updated:** [October 30, 2023, 3:21pm UTC](https://discourse.julialang.org/t/how-does-compat-requirement-changes-for-general-registry-affect-package-maintainers/104960 "2023-10-30T15:21:38Z")

</div>

Hi folks! This is a post about the recent announcement: I was curious about a few things here: How does this impact packages that support testing of older Julia versions which did not have this segmentation of stan…

---

## [Sort matrix based on the elements of a specific column](https://discourse.julialang.org/t/sort-matrix-based-on-the-elements-of-a-specific-column/23475)

<div class="topic-metadata">

**Author:** [@eed](https://discourse.julialang.org/u/eed)\
**Replies:** 8\
**Last updated:** [October 30, 2023, 2:12am UTC](https://discourse.julialang.org/t/sort-matrix-based-on-the-elements-of-a-specific-column/23475 "2023-10-30T02:12:35Z")

</div>

Hi I’m new to Julia but I have some exprience with Matlab. I have an array A (mix of numbers and text columns) and I want to sort the rows based on the values on a specific column of A. In matlab, the code is: B = so…

---

## [Keyboard Buttons in GameZero](https://discourse.julialang.org/t/keyboard-buttons-in-gamezero/105547)

<div class="topic-metadata">

**Author:** [@CallError](https://discourse.julialang.org/u/CallError)\
**Replies:** 2\
**Last updated:** [October 30, 2023, 8:19am UTC](https://discourse.julialang.org/t/keyboard-buttons-in-gamezero/105547 "2023-10-30T08:19:56Z")

</div>

I use g.keyboard.LEFT to check whether the Left button is pressed. What about plus and minus. For minus i can use g.keyboard.MINUS , but it is not working for plus. I believe it is because shift has to be pressed on …

---

## [Coloring Voronoi cells in Delaunay Triangulations by area](https://discourse.julialang.org/t/coloring-voronoi-cells-in-delaunay-triangulations-by-area/105545)

<div class="topic-metadata">

**Author:** [@charperflow](https://discourse.julialang.org/u/charperflow)\
**Replies:** 3\
**Last updated:** [October 30, 2023, 6:17am UTC](https://discourse.julialang.org/t/coloring-voronoi-cells-in-delaunay-triangulations-by-area/105545 "2023-10-30T06:17:45Z")

</div>

I have a set of points which I have used the DelaunayTriangulation Package to generate voronoi cells. I have calculated the are of each cell, and now I want to color each cell according to the area. When I read the voron…

---

## [Calling a more generic method with Parametric Types](https://discourse.julialang.org/t/calling-a-more-generic-method-with-parametric-types/105537)

<div class="topic-metadata">

**Author:** [@rmellema](https://discourse.julialang.org/u/rmellema)\
**Replies:** 10\
**Last updated:** [October 29, 2023, 7:27pm UTC](https://discourse.julialang.org/t/calling-a-more-generic-method-with-parametric-types/105537 "2023-10-29T19:27:08Z")

</div>

Hey all, For some context, I want to do some work with the Agents.jl package in which I want to try to keep track of the movement of the agents (so I can draw their paths and manipulate them later). The easiest way I th…

---

## [UODE error](https://discourse.julialang.org/t/uode-error/105429)

<div class="topic-metadata">

**Author:** [@Marco\_Nesta](https://discourse.julialang.org/u/Marco_Nesta)\
**Replies:** 7\
**Last updated:** [October 29, 2023, 5:41pm UTC](https://discourse.julialang.org/t/uode-error/105429 "2023-10-29T17:41:50Z")

</div>

following this link signal (11.1): Segmentation fault in uODE · Issue #851 · SciML/DiffEqFlux.jl · GitHub I tried the code of the solution proposed by @ChrisRackauckas , but I have this error. can anyone help me? ERROR:…

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

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