# General Usage

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

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

**Page:** 428

---

## [Timing 1.9 WAS (mistaken): Hang on 1.6.6, 1.7.0, julia-1.8.0-beta3 and 1.9](https://discourse.julialang.org/t/timing-1-9-was-mistaken-hang-on-1-6-6-1-7-0-julia-1-8-0-beta3-and-1-9/83752)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [July 5, 2022, 12:07am UTC](https://discourse.julialang.org/t/timing-1-9-was-mistaken-hang-on-1-6-6-1-7-0-julia-1-8-0-beta3-and-1-9/83752 "2022-07-05T00:07:58Z")

</div>

EDIT: @rssdev1 it’s obvious, in hindsight, that your test code had 1/4 (for 15 sec.) change of failing! Nothing to do with memory/GC or the new option, which is great! And thanks for fixing the test code now in the PR. W…

---

## [Hard to beat Numba / JAX loop for generating Mandelbrot](https://discourse.julialang.org/t/hard-to-beat-numba-jax-loop-for-generating-mandelbrot/82725)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 61\
**Last updated:** [June 30, 2022, 4:03am UTC](https://discourse.julialang.org/t/hard-to-beat-numba-jax-loop-for-generating-mandelbrot/82725 "2022-06-30T04:03:53Z")

</div>

find the numba code in: mandelbrot-on-all-accelerators.ipynb · GitHub under title “Numba: imperative in a compiled subset of Python”, on my laptop, the numba code reports: In \[30\]: %%timeit ...: run\_numba(2000, 3000…

---

## [LanguageServer.jl does not find my own modules](https://discourse.julialang.org/t/languageserver-jl-does-not-find-my-own-modules/73683)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 2\
**Last updated:** [July 4, 2022, 9:06pm UTC](https://discourse.julialang.org/t/languageserver-jl-does-not-find-my-own-modules/73683 "2022-07-04T21:06:28Z")

</div>

I got the LanguageServer.jl mostly working in neovim with neovim/nvim-lspconfig. The only thing that is not working, is that I get a “Missing reference” for all my own modules (i.e. those not in packages installed via Pk…

---

## [Using Graphs to determine parallel order of execution for dependencies](https://discourse.julialang.org/t/using-graphs-to-determine-parallel-order-of-execution-for-dependencies/83757)

<div class="topic-metadata">

**Author:** [@Jon\_Barker](https://discourse.julialang.org/u/Jon_Barker)\
**Replies:** 2\
**Last updated:** [July 4, 2022, 8:32pm UTC](https://discourse.julialang.org/t/using-graphs-to-determine-parallel-order-of-execution-for-dependencies/83757 "2022-07-04T20:32:26Z")

</div>

Hello smart people, I have a list of operations which I want to parallelize the order. To do this, I’m using a graph of dependencies. However I’m stuck at what to do next. I found a nice SO post that explains it well, h…

---

## [JET is unhappy with broadcast assigning a matrix to a submatrix, rooted in \`abstractarray.jl\`](https://discourse.julialang.org/t/jet-is-unhappy-with-broadcast-assigning-a-matrix-to-a-submatrix-rooted-in-abstractarray-jl/83750)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 0\
**Last updated:** [July 4, 2022, 4:34pm UTC](https://discourse.julialang.org/t/jet-is-unhappy-with-broadcast-assigning-a-matrix-to-a-submatrix-rooted-in-abstractarray-jl/83750 "2022-07-04T16:34:13Z")

</div>

This seems like a pretty innocent piece of code but JET reports a possible issue. julia\> function f1(n) # Vectors work fine m = zeros(2n) sub = zeros(n) m\[n+1:2n\] .= sub m …

---

## [Auto-update of Julia (apps) and other languages](https://discourse.julialang.org/t/auto-update-of-julia-apps-and-other-languages/83746)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [July 4, 2022, 3:32pm UTC](https://discourse.julialang.org/t/auto-update-of-julia-apps-and-other-languages/83746 "2022-07-04T15:32:24Z")

</div>

I’m aware of juliaup, but I’m thinking, is there a way to auto-update a Julia app (e.g. one made with PackageCompiler.jl)? I was curious what’s available for other languages, e.g. MATLAB we compare too, and Python: htt…

---

## [How to use findmax!?](https://discourse.julialang.org/t/how-to-use-findmax/83723)

<div class="topic-metadata">

**Author:** [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Replies:** 3\
**Last updated:** [July 4, 2022, 9:03am UTC](https://discourse.julialang.org/t/how-to-use-findmax/83723 "2022-07-04T09:03:21Z")

</div>

Dear all, Can you give me an example of how to use findmax!?

---

## [Sniffing the return type](https://discourse.julialang.org/t/sniffing-the-return-type/83666)

<div class="topic-metadata">

**Author:** [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)\
**Replies:** 38\
**Last updated:** [July 4, 2022, 6:19am UTC](https://discourse.julialang.org/t/sniffing-the-return-type/83666 "2022-07-04T06:19:37Z")

</div>

I’d like to be able to programmatically determine the return type of a closure. The closure is explicitly declared such that it has no arguments and can only possibly return one type. Minimal example: julia\> f() = "Th…

---

## [Vectors of vector parameters in Turing.jl?](https://discourse.julialang.org/t/vectors-of-vector-parameters-in-turing-jl/83645)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 2\
**Last updated:** [July 4, 2022, 4:26am UTC](https://discourse.julialang.org/t/vectors-of-vector-parameters-in-turing-jl/83645 "2022-07-04T04:26:28Z")

</div>

I want to run a Bayesian model in which there’s an overall US average behavior, which is the mean for a set of regional behaviors, and that is the mean for all the states in the region… the behavior is defined in terms o…

---

## [Interpreting \`JET\` warnings on a simple \`Polyester\` multithreaded loop](https://discourse.julialang.org/t/interpreting-jet-warnings-on-a-simple-polyester-multithreaded-loop/83681)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 7\
**Last updated:** [July 4, 2022, 3:12am UTC](https://discourse.julialang.org/t/interpreting-jet-warnings-on-a-simple-polyester-multithreaded-loop/83681 "2022-07-04T03:12:23Z")

</div>

Polyester seems to be one of the bigger sources of TTFX in some of my libraries. It is similarly the main source of warnings when using JET. Below is a very simple multi-threaded loop that causes a large number of JET wa…

---

## [Linear Algebra Application: Warps and Morphs in Julia](https://discourse.julialang.org/t/linear-algebra-application-warps-and-morphs-in-julia/83716)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 0\
**Last updated:** [July 4, 2022, 12:55am UTC](https://discourse.julialang.org/t/linear-algebra-application-warps-and-morphs-in-julia/83716 "2022-07-04T00:55:09Z")

</div>

Hi all, I am reading Linear Algebra book and I am wondering, is Julia capable of doing warps and morphs? The example is attached (a picture of a projection how someone will get old). Anyone ever done similar thing here…

---

## [Vectorized statistics.jl](https://discourse.julialang.org/t/vectorized-statistics-jl/83506)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 3\
**Last updated:** [July 3, 2022, 7:36pm UTC](https://discourse.julialang.org/t/vectorized-statistics-jl/83506 "2022-07-03T19:36:46Z")

</div>

Hi, I came across VectorizedStatistics.jl but cant see it mentioned in package announcements (although it’s available in the general registry). It appears to be an absolutely incredible leap in performance (for some use…

---

## [Julia call c struct function](https://discourse.julialang.org/t/julia-call-c-struct-function/83699)

<div class="topic-metadata">

**Author:** [@kongdd](https://discourse.julialang.org/u/kongdd)\
**Replies:** 2\
**Last updated:** [July 3, 2022, 7:06pm UTC](https://discourse.julialang.org/t/julia-call-c-struct-function/83699 "2022-07-03T19:06:25Z")

</div>

I need to interface the C language update\_leaf function with Julia. But the current script has memory error. // leaf.c // gcc -shared -fPIC -o leaf.o leaf.c #include \<stdio.h\> /\*\* second solution \*/ typedef struct { …

---

## [How to overload \`ConstructionBase.setproperties\` to change struct properties?](https://discourse.julialang.org/t/how-to-overload-constructionbase-setproperties-to-change-struct-properties/83686)

<div class="topic-metadata">

**Author:** [@vkv](https://discourse.julialang.org/u/vkv)\
**Replies:** 2\
**Last updated:** [July 3, 2022, 7:03pm UTC](https://discourse.julialang.org/t/how-to-overload-constructionbase-setproperties-to-change-struct-properties/83686 "2022-07-03T19:03:22Z")

</div>

I want to change the value of certain properties in a struct. But Setfield is not working. MWE: using Setfield struct C{S,T, K} i::T j::Bool end c = C{Float64, Int, BitArray}(1.0,true) @set! c.i = 2 ERROR: …

---

## [Latex systeme not working on pluto md](https://discourse.julialang.org/t/latex-systeme-not-working-on-pluto-md/83711)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 2\
**Last updated:** [July 3, 2022, 6:11pm UTC](https://discourse.julialang.org/t/latex-systeme-not-working-on-pluto-md/83711 "2022-07-03T18:11:58Z")

</div>

Hello, good afternoon, Is it possible use the command systeme to draw linear equations in pluto md? In my tests, systeme is not recognized. md""" $$\\systeme{x+y=7,-x+3y=1}$$ """

---

## [Change Location of Label in Plots + The xtick axis are not showing fully](https://discourse.julialang.org/t/change-location-of-label-in-plots-the-xtick-axis-are-not-showing-fully/83689)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [July 3, 2022, 2:13pm UTC](https://discourse.julialang.org/t/change-location-of-label-in-plots-the-xtick-axis-are-not-showing-fully/83689 "2022-07-03T14:13:06Z")

</div>

Hi all, I am plotting sine waves, but there are problems: xtick shows half the number of denominator, e.g. 5 \\pi / 4 (the 4 is barely seen) The label placement can it be moved above or at the bottom of the whole graph…

---

## [Opinions about code performance](https://discourse.julialang.org/t/opinions-about-code-performance/83692)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 1\
**Last updated:** [July 3, 2022, 11:18am UTC](https://discourse.julialang.org/t/opinions-about-code-performance/83692 "2022-07-03T11:18:32Z")

</div>

I timed a single loop of my code with time, and got the following statistics. Could anyone please comment as to whether the performance is about normal or actually there are too many allocations which should be reduced …

---

## [Why doesn't this function compile](https://discourse.julialang.org/t/why-doesnt-this-function-compile/83665)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 4\
**Last updated:** [July 2, 2022, 9:20pm UTC](https://discourse.julialang.org/t/why-doesnt-this-function-compile/83665 "2022-07-02T21:20:05Z")

</div>

Can anyone tell me why this code doesn’t compile: function f1( x::T ) where {T} function f2( y::U ) where {U \<: AbstractVector{T}} return 0.0 end return f2 end

---

## [In-place svd?](https://discourse.julialang.org/t/in-place-svd/60567)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 16\
**Last updated:** [July 2, 2022, 1:19pm UTC](https://discourse.julialang.org/t/in-place-svd/60567 "2022-07-02T13:19:07Z")

</div>

I need to do SVD many many times, so I wanna have a in-place version of svd(). What I mean by “in-place” is like: svd!(U, S, V, A) which works out the svd of A and writes the output matrices into the pre-allocated U, S…

---

## [Compat helpers failed](https://discourse.julialang.org/t/compat-helpers-failed/83655)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [July 2, 2022, 8:22am UTC](https://discourse.julialang.org/t/compat-helpers-failed/83655 "2022-07-02T08:22:57Z")

</div>

I get a lot of error messages that “compat helpers failed” lately. See for example: https://github.com/aenarete/KiteSimulators.jl/actions/runs/2599806644 {"message":"GitHub Actions is not permitted to create or approve…

---

## [LoadError: ArgumentError: Package PDMats does not have IterativeEigensolvers in its dependencies:](https://discourse.julialang.org/t/loaderror-argumenterror-package-pdmats-does-not-have-iterativeeigensolvers-in-its-dependencies/83608)

<div class="topic-metadata">

**Author:** [@Sanjaya\_J\_Shetty](https://discourse.julialang.org/u/Sanjaya_J_Shetty)\
**Replies:** 0\
**Last updated:** [July 1, 2022, 10:53am UTC](https://discourse.julialang.org/t/loaderror-argumenterror-package-pdmats-does-not-have-iterativeeigensolvers-in-its-dependencies/83608 "2022-07-01T10:53:04Z")

</div>

Hey, I’m new to Julia. I’m trying to load PDMats in Julia. using PDMats and I get the following error: ERROR: LoadError: ArgumentError: Package PDMats does not have IterativeEigensolvers in its dependencies: - If you…

---

## [Error Plots package installation with 1.7.1 release of Julia](https://discourse.julialang.org/t/error-plots-package-installation-with-1-7-1-release-of-julia/75308)

<div class="topic-metadata">

**Author:** [@Mikel\_Antonana](https://discourse.julialang.org/u/Mikel_Antonana)\
**Replies:** 6\
**Last updated:** [July 2, 2022, 3:43am UTC](https://discourse.julialang.org/t/error-plots-package-installation-with-1-7-1-release-of-julia/75308 "2022-07-02T03:43:48Z")

</div>

I have installed 1.7.1 release of Julia, but I get the next error when I try to use Plots package Pkg.status() Status \`~/.julia/environments/v1.7/Project.toml\` \[7073ff75\] IJulia v1.23.2 \[91a5bcdd\] Plots v1.25.7 usi…

---

## [Any working way to call Python from Julia compiled app?](https://discourse.julialang.org/t/any-working-way-to-call-python-from-julia-compiled-app/79423)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 13\
**Last updated:** [July 1, 2022, 9:36pm UTC](https://discourse.julialang.org/t/any-working-way-to-call-python-from-julia-compiled-app/79423 "2022-07-01T21:36:17Z")

</div>

I tried to compile a relocatable app with PackageCompiler.create\_app and call Python from it. With PyCall.jl - there is a problem that compiled binary has an absolute path to python library on dev machine (on my Window…

---

## [How to save recursive functions in julia](https://discourse.julialang.org/t/how-to-save-recursive-functions-in-julia/83644)

<div class="topic-metadata">

**Author:** [@ArjunSingh26](https://discourse.julialang.org/u/ArjunSingh26)\
**Replies:** 1\
**Last updated:** [July 1, 2022, 9:31pm UTC](https://discourse.julialang.org/t/how-to-save-recursive-functions-in-julia/83644 "2022-07-01T21:31:22Z")

</div>

Hi everyone, This summer, I’m doing some research involving mathematical particle simulations. Part of my work revolves around a “shape function”, which for the purposes of this post, is simply a function that takes an …

---

## [ERROR: UndefVarError: write\_parquet not defined](https://discourse.julialang.org/t/error-undefvarerror-write-parquet-not-defined/83642)

<div class="topic-metadata">

**Author:** [@vargasje](https://discourse.julialang.org/u/vargasje)\
**Replies:** 0\
**Last updated:** [July 1, 2022, 8:29pm UTC](https://discourse.julialang.org/t/error-undefvarerror-write-parquet-not-defined/83642 "2022-07-01T20:29:25Z")

</div>

OS = Ubuntu 22.04 LTS Julia Version = 1.7.3 Pkg.add(“ParquetFiles”) ; using ParquetFiles Pkg.add(“IndexedTables”) ; using IndexedTables Pkg.add(“TimeSeries”) ; using TimeSeries Pkg.add(“Temporal”); using Temporal P…

---

## [Package Mangement Problems](https://discourse.julialang.org/t/package-mangement-problems/83570)

<div class="topic-metadata">

**Author:** [@kw\_martin](https://discourse.julialang.org/u/kw_martin)\
**Replies:** 3\
**Last updated:** [July 1, 2022, 6:00pm UTC](https://discourse.julialang.org/t/package-mangement-problems/83570 "2022-07-01T18:00:38Z")

</div>

I am developing a “package” similar to Mathworks Simulink but base on Julia. Entry is via xschem schematic capture into a verilog net list, which is parsed into an abstract syntax tree, and then into a “Universal Net Lis…

---

## [Cannot type "@" in Jupyter notebooks with macOS Swiss German keyboard layout](https://discourse.julialang.org/t/cannot-type-in-jupyter-notebooks-with-macos-swiss-german-keyboard-layout/83573)

<div class="topic-metadata">

**Author:** [@Smsng2\_Xprss](https://discourse.julialang.org/u/Smsng2_Xprss)\
**Replies:** 3\
**Last updated:** [July 1, 2022, 5:28pm UTC](https://discourse.julialang.org/t/cannot-type-in-jupyter-notebooks-with-macos-swiss-german-keyboard-layout/83573 "2022-07-01T17:28:05Z")

</div>

When using Julia in Jupyter Notebook, if I want to type “@” in the cell (for example @variables), key kombination alt + G on my mac is somehow reserved for a shortcut " Jump to line…", so I am not able to type a literal …

---

## [Easy way to reach online documentation?](https://discourse.julialang.org/t/easy-way-to-reach-online-documentation/83462)

<div class="topic-metadata">

**Author:** [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)\
**Replies:** 10\
**Last updated:** [July 1, 2022, 4:02pm UTC](https://discourse.julialang.org/t/easy-way-to-reach-online-documentation/83462 "2022-07-01T16:02:12Z")

</div>

This is one of those “what am I missing?” posts. The function-based documentation of packages using ? at the REPL is, shall we say, inconsistently helpful. Most decent packages do have web documentation that ranges from…

---

## [Calling macro from within generated function in Julia](https://discourse.julialang.org/t/calling-macro-from-within-generated-function-in-julia/83632)

<div class="topic-metadata">

**Author:** [@JordiManyer](https://discourse.julialang.org/u/JordiManyer)\
**Replies:** 0\
**Last updated:** [July 1, 2022, 4:01pm UTC](https://discourse.julialang.org/t/calling-macro-from-within-generated-function-in-julia/83632 "2022-07-01T16:01:43Z")

</div>

I have been messing around with generated functions in Julia, and have come to a weird problem I do not understand fully: My final goal would involve calling a macro (more specifically @tullio) from within a generated fu…

---

## [ModelingToolkit: Indexing a parameter by another parameter in an ODEProblem](https://discourse.julialang.org/t/modelingtoolkit-indexing-a-parameter-by-another-parameter-in-an-odeproblem/83569)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 3\
**Last updated:** [July 1, 2022, 3:54pm UTC](https://discourse.julialang.org/t/modelingtoolkit-indexing-a-parameter-by-another-parameter-in-an-odeproblem/83569 "2022-07-01T15:54:25Z")

</div>

I have an ODEProblem where I need to index into a parameter using another separate parameter. Consider for example using ModelingToolkit, DifferentialEquations function rober(du, u, p, t) y₁, y₂, y₃ = u k₁, k₂, …

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

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