# Latest

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

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

**Page:** 861

---

## [How to approximate a distribution function from an arbitrary list?](https://discourse.julialang.org/t/how-to-approximate-a-distribution-function-from-an-arbitrary-list/90471)

<div class="topic-metadata">

**Author:** [@somranger](https://discourse.julialang.org/u/somranger)\
**Replies:** 5\
**Last updated:** [November 18, 2022, 7:35pm UTC](https://discourse.julialang.org/t/how-to-approximate-a-distribution-function-from-an-arbitrary-list/90471 "2022-11-18T19:35:59Z")

</div>

I hope to obtain a approximated distribution function from list, counting exsiting times of each element. Is there any package can achieve this? In mathematica, function SmoothKernelDistribution (in Wolfram document, it…

---

## [Running tests from a GitLab mirror and showing results in GitHub](https://discourse.julialang.org/t/running-tests-from-a-gitlab-mirror-and-showing-results-in-github/90149)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 12\
**Last updated:** [November 18, 2022, 7:35pm UTC](https://discourse.julialang.org/t/running-tests-from-a-gitlab-mirror-and-showing-results-in-github/90149 "2022-11-18T19:35:11Z")

</div>

I know that at least some projects (e.g., GitHub - JuliaPerf/LIKWID.jl: Julia wrapper for the performance monitoring and benchmarking suite LIKWID.) use a setup where they mirror their GitHub repositories to a GitLab ins…

---

## [Optim: Why am I able to mutate array elements but not Int?](https://discourse.julialang.org/t/optim-why-am-i-able-to-mutate-array-elements-but-not-int/89924)

<div class="topic-metadata">

**Author:** [@CeterisPartybus](https://discourse.julialang.org/u/CeterisPartybus)\
**Replies:** 13\
**Last updated:** [November 18, 2022, 5:37pm UTC](https://discourse.julialang.org/t/optim-why-am-i-able-to-mutate-array-elements-but-not-int/89924 "2022-11-18T17:37:15Z")

</div>

I am trying to pass an object inside a function I optimize with Optim.jl, mutate it, and access the result in the next iteration. While testing, I noticed that I can change elements of an array, defined outside of the f…

---

## [Any suggestion on how to increase CPU usage in Flux?](https://discourse.julialang.org/t/any-suggestion-on-how-to-increase-cpu-usage-in-flux/90467)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 0\
**Last updated:** [November 18, 2022, 5:26pm UTC](https://discourse.julialang.org/t/any-suggestion-on-how-to-increase-cpu-usage-in-flux/90467 "2022-11-18T17:26:03Z")

</div>

Hi, I open this topic because I found that sometimes Flux can use 100% of the CPU, but sometimes it only uses half. For example, here is two demo model, model A have fewer hidden layers than B. Trainning model A, the C…

---

## [Inconsistent Test results between VScode TestItems.jl and Test.jl](https://discourse.julialang.org/t/inconsistent-test-results-between-vscode-testitems-jl-and-test-jl/90344)

<div class="topic-metadata">

**Author:** [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Replies:** 4\
**Last updated:** [November 18, 2022, 4:10pm UTC](https://discourse.julialang.org/t/inconsistent-test-results-between-vscode-testitems-jl-and-test-jl/90344 "2022-11-18T16:10:24Z")

</div>

Hi all, When testing a package I develop, I had an inconsistency in the result of the unit test of one of my functions between the testing framework TestItems.jl used within the VSCode UI and Test.jl. Here is a code sa…

---

## [Debug checks without output](https://discourse.julialang.org/t/debug-checks-without-output/90458)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 5\
**Last updated:** [November 18, 2022, 4:02pm UTC](https://discourse.julialang.org/t/debug-checks-without-output/90458 "2022-11-18T16:02:15Z")

</div>

hello, is it correct way to use a large number of checks in the code without output, and then turn them off at once? const USE\_DEBUG\_CODE\_BLOCKS = true macro debug\_code\_block(expr) USE\_DEBUG\_CODE\_BLOCKS || return n…

---

## [How to install a specific version of a package with Pkg.add("...")](https://discourse.julialang.org/t/how-to-install-a-specific-version-of-a-package-with-pkg-add/29242)

<div class="topic-metadata">

**Author:** [@steph\_de\_paris](https://discourse.julialang.org/u/steph_de_paris)\
**Replies:** 9\
**Last updated:** [November 18, 2022, 3:47pm UTC](https://discourse.julialang.org/t/how-to-install-a-specific-version-of-a-package-with-pkg-add/29242 "2022-11-18T15:47:27Z")

</div>

Hello, I know that is is possible to install a specific version of a package with pkg\> add xxx@1.2.3 (for example) in the julia\> window. Nevertheless, is-it possible to do this with something like Pkg.add("xxx@1.2.3"…

---

## [Best practice for storing, passing, and managing parameters in economic models](https://discourse.julialang.org/t/best-practice-for-storing-passing-and-managing-parameters-in-economic-models/64705)

<div class="topic-metadata">

**Author:** [@PatrickMcFarlane](https://discourse.julialang.org/u/PatrickMcFarlane)\
**Replies:** 22\
**Last updated:** [November 18, 2022, 2:57pm UTC](https://discourse.julialang.org/t/best-practice-for-storing-passing-and-managing-parameters-in-economic-models/64705 "2022-11-18T14:57:17Z")

</div>

I am working on a discrete time HANK model in Julia. The model has a very large number of parameters. Most of these are related to the theoretical structure of the model (e.g., production function parameters, utility f…

---

## [Position in matrix without using findall](https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451)

<div class="topic-metadata">

**Author:** [@amar.korvac](https://discourse.julialang.org/u/amar.korvac)\
**Replies:** 2\
**Last updated:** [November 18, 2022, 2:15pm UTC](https://discourse.julialang.org/t/position-in-matrix-without-using-findall/90451 "2022-11-18T14:15:28Z")

</div>

Hello people, I need help. I don’t know how to find position of non-zero elements in matrix , but without using findall. I know only with findall.:joy:

---

## [Why can't this named tuple be converted to a supertype?](https://discourse.julialang.org/t/why-cant-this-named-tuple-be-converted-to-a-supertype/90329)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 11\
**Last updated:** [November 18, 2022, 2:03pm UTC](https://discourse.julialang.org/t/why-cant-this-named-tuple-be-converted-to-a-supertype/90329 "2022-11-18T14:03:43Z")

</div>

In the following two somewhat similar chunks of code the first generates an error, the other does not. Any ideas about why? using DataFrames, Dates NT1 = NamedTuple{(:DFPrecalc,:VPrecalc), Tuple{DataFrame,S}} where S …

---

## [Julia Versions for ppc64le](https://discourse.julialang.org/t/julia-versions-for-ppc64le/90422)

<div class="topic-metadata">

**Author:** [@bmgroth](https://discourse.julialang.org/u/bmgroth)\
**Replies:** 3\
**Last updated:** [November 18, 2022, 1:48pm UTC](https://discourse.julialang.org/t/julia-versions-for-ppc64le/90422 "2022-11-18T13:48:47Z")

</div>

Hello Julia community, I am searching for the latest build that will compile on IBM Power (powerpc) for Linux. In an IBM dev blog linked here (IBM Developer), the command to download the version they used for Power for…

---

## [Indexing a StructVector with an MVector fails](https://discourse.julialang.org/t/indexing-a-structvector-with-an-mvector-fails/90446)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 4\
**Last updated:** [November 18, 2022, 1:13pm UTC](https://discourse.julialang.org/t/indexing-a-structvector-with-an-mvector-fails/90446 "2022-11-18T13:13:29Z")

</div>

Why does indexing a StructVector with an MVector fail? E.g., I have meas\_idx 7-element MVector{7, Int64} with indices SOneTo(7): 809 267 1721 1165 643 716 1808 and pc\[meas\_idx\] ArgumentError: invalid ind…

---

## [How to draw three box plot for each job title in each year from 2020,2021,2022(give up on vegalite, any package as long as they can work, no makie cz my computer can't install it)?](https://discourse.julialang.org/t/how-to-draw-three-box-plot-for-each-job-title-in-each-year-from-2020-2021-2022-give-up-on-vegalite-any-package-as-long-as-they-can-work-no-makie-cz-my-computer-cant-install-it/90448)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 0\
**Last updated:** [November 18, 2022, 1:09pm UTC](https://discourse.julialang.org/t/how-to-draw-three-box-plot-for-each-job-title-in-each-year-from-2020-2021-2022-give-up-on-vegalite-any-package-as-long-as-they-can-work-no-makie-cz-my-computer-cant-install-it/90448 "2022-11-18T13:09:58Z")

</div>

Hi, I have got this dataset which comes from the following code: import Downloads using DLMReader, VegaLite, InMemoryDatasets data=Downloads.download("https://raw.githubusercontent.com/akshdfyehd/salary/main/ds\_salarie…

---

## [Issue with creating a CSV file path](https://discourse.julialang.org/t/issue-with-creating-a-csv-file-path/90447)

<div class="topic-metadata">

**Author:** [@MHend99](https://discourse.julialang.org/u/MHend99)\
**Replies:** 1\
**Last updated:** [November 18, 2022, 1:02pm UTC](https://discourse.julialang.org/t/issue-with-creating-a-csv-file-path/90447 "2022-11-18T13:02:27Z")

</div>

I’m a rookie at this!!! I am having an issue with loading a csv file onto a notebook which I need to complete for an assignment. I am not sure where I am missing a comma or ) but i have tried several variations and this …

---

## [Is the latest stable (macOS) version of Julia 1.8.2 or 1.8.3?](https://discourse.julialang.org/t/is-the-latest-stable-macos-version-of-julia-1-8-2-or-1-8-3/90416)

<div class="topic-metadata">

**Author:** [@suschizu](https://discourse.julialang.org/u/suschizu)\
**Replies:** 3\
**Last updated:** [November 18, 2022, 12:50pm UTC](https://discourse.julialang.org/t/is-the-latest-stable-macos-version-of-julia-1-8-2-or-1-8-3/90416 "2022-11-18T12:50:47Z")

</div>

the github project already marked 1.8.3 as latest stable version but the website download is still on 1.8.2 … could somebody clarify this please? thanks

---

## [Call macro in condition on run time](https://discourse.julialang.org/t/call-macro-in-condition-on-run-time/90434)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 2\
**Last updated:** [November 18, 2022, 12:43pm UTC](https://discourse.julialang.org/t/call-macro-in-condition-on-run-time/90434 "2022-11-18T12:43:07Z")

</div>

There are the codes: struct A{T} n::T end (a::A{Int})(x::Vector) = begin res = similar for i = 1 : size(x, 1) res\[i\] = x\[i\] end res end (a::A{Float64})(x::Vector) = begin res = similar …

---

## [Using ForwardDiff results in a stack overflow](https://discourse.julialang.org/t/using-forwarddiff-results-in-a-stack-overflow/90399)

<div class="topic-metadata">

**Author:** [@c\_sell](https://discourse.julialang.org/u/c_sell)\
**Replies:** 4\
**Last updated:** [November 18, 2022, 12:16pm UTC](https://discourse.julialang.org/t/using-forwarddiff-results-in-a-stack-overflow/90399 "2022-11-18T12:16:46Z")

</div>

Hi, im using the ForwardDiff package. The following code is only a simplification of the real problem. But I am getting there as well a stack overflow in the line of the LU decomposition. using ForwardDiff, LinearAlgeb…

---

## [\[ModelingToolkit\] \[Symbolics\] Symbolic parameter metadata is erased if parameter is of type Term](https://discourse.julialang.org/t/modelingtoolkit-symbolics-symbolic-parameter-metadata-is-erased-if-parameter-is-of-type-term/90437)

<div class="topic-metadata">

**Author:** [@lxsilva](https://discourse.julialang.org/u/lxsilva)\
**Replies:** 0\
**Last updated:** [November 18, 2022, 11:37am UTC](https://discourse.julialang.org/t/modelingtoolkit-symbolics-symbolic-parameter-metadata-is-erased-if-parameter-is-of-type-term/90437 "2022-11-18T11:37:13Z")

</div>

Hey guys, not sure if the title was clear enough but I’ll try to illustrate the issue with code. The code: @parameters p\[1:2\] u u = GlobalScope(u) #so parameter u will not be namescoped when one uses 'compose' p = …

---

## [Output arguments of functions must be pre-defined? (Julia version 1.8.2)](https://discourse.julialang.org/t/output-arguments-of-functions-must-be-pre-defined-julia-version-1-8-2/90321)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 17\
**Last updated:** [November 18, 2022, 9:57am UTC](https://discourse.julialang.org/t/output-arguments-of-functions-must-be-pre-defined-julia-version-1-8-2/90321 "2022-11-18T09:57:07Z")

</div>

The documentation states explicitly that “The default behavior in Julia when types are omitted is to allow values to be of any type. Thus, one can write many useful Julia functions without ever explicitly using types.”…

---

## [Are "optimized" single thread algorithms typically different than "optimized" multithread implementations?](https://discourse.julialang.org/t/are-optimized-single-thread-algorithms-typically-different-than-optimized-multithread-implementations/90412)

<div class="topic-metadata">

**Author:** [@JohnS](https://discourse.julialang.org/u/JohnS)\
**Replies:** 8\
**Last updated:** [November 18, 2022, 9:33am UTC](https://discourse.julialang.org/t/are-optimized-single-thread-algorithms-typically-different-than-optimized-multithread-implementations/90412 "2022-11-18T09:33:41Z")

</div>

Thanks for your help everyone! I’m relatively new to multithreading and I’m probably wrong, but it seems like the fastest function for the desired output using a single thread doesn’t parallelize well. However, a for-lo…

---

## [Installing packages via an SSH SOCKS proxy on a compute cluster](https://discourse.julialang.org/t/installing-packages-via-an-ssh-socks-proxy-on-a-compute-cluster/71735)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 6\
**Last updated:** [November 18, 2022, 9:21am UTC](https://discourse.julialang.org/t/installing-packages-via-an-ssh-socks-proxy-on-a-compute-cluster/71735 "2022-11-18T09:21:35Z")

</div>

I have spent the better part of a day figuring this out, so I thought it might be interesting to share for others: In my case, I would like to run Julia on a university cluster with very restricted internet access from …

---

## [How to avoid deadlocking on finite channel](https://discourse.julialang.org/t/how-to-avoid-deadlocking-on-finite-channel/90429)

<div class="topic-metadata">

**Author:** [@HANHAOHAN](https://discourse.julialang.org/u/HANHAOHAN)\
**Replies:** 5\
**Last updated:** [November 18, 2022, 9:20am UTC](https://discourse.julialang.org/t/how-to-avoid-deadlocking-on-finite-channel/90429 "2022-11-18T09:20:38Z")

</div>

code as following will deadlock. c = Channel(2) t1 = Threads.@spawn begin while !trylock(c) yield() println("trylock for reading") end try put!(c, rand()) put!(c, rand()) …

---

## [How to solve this package compatibility issue?](https://discourse.julialang.org/t/how-to-solve-this-package-compatibility-issue/90431)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 2\
**Last updated:** [November 18, 2022, 9:15am UTC](https://discourse.julialang.org/t/how-to-solve-this-package-compatibility-issue/90431 "2022-11-18T09:15:33Z")

</div>

I have a package PAM that depends on GraphMakie.jl and uses the GLMakie backend. The pacakge now has a very peculiar issue related to the version of Observables.jl package. Tests show that the issue is caused by the late…

---

## [Makie how to know if a figure is displayed or not](https://discourse.julialang.org/t/makie-how-to-know-if-a-figure-is-displayed-or-not/90432)

<div class="topic-metadata">

**Author:** [@yjr](https://discourse.julialang.org/u/yjr)\
**Replies:** 0\
**Last updated:** [November 18, 2022, 9:04am UTC](https://discourse.julialang.org/t/makie-how-to-know-if-a-figure-is-displayed-or-not/90432 "2022-11-18T09:04:13Z")

</div>

Hello, I m doing a GUI in makie that calls some timer to refresh information displayed. I would like to close these timers either if the figure is not displayed or the closing cross button is clicked. So is there a meth…

---

## [CUDA.jl - A Clear Example of Dynamic Parallelism](https://discourse.julialang.org/t/cuda-jl-a-clear-example-of-dynamic-parallelism/78856)

<div class="topic-metadata">

**Author:** [@moukann](https://discourse.julialang.org/u/moukann)\
**Replies:** 6\
**Last updated:** [November 18, 2022, 8:24am UTC](https://discourse.julialang.org/t/cuda-jl-a-clear-example-of-dynamic-parallelism/78856 "2022-11-18T08:24:38Z")

</div>

Hello all, I am not so experienced with CUDA.jl and I cannot find examples on concepts of GPU programming. Dynamic parallelism is a wonderful feature but I could not find an example to learn and apply to my program. Le…

---

## [How to specify \`margins\` to \`0mm\` in RecipesBase.jl?](https://discourse.julialang.org/t/how-to-specify-margins-to-0mm-in-recipesbase-jl/90384)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 3\
**Last updated:** [November 18, 2022, 1:25am UTC](https://discourse.julialang.org/t/how-to-specify-margins-to-0mm-in-recipesbase-jl/90384 "2022-11-18T01:25:39Z")

</div>

If I want to create a recipe for my type with only RecipesBase.@recipe, I seem not to be able to specify all margins to be 0 or 0mm, where it requires a Measure type, which is defined in Plots.Measures module. How can I …

---

## [Julia 1.8.3 and 1.9.0-alpha1 have been released](https://discourse.julialang.org/t/julia-1-8-3-and-1-9-0-alpha1-have-been-released/90418)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 10:03pm UTC](https://discourse.julialang.org/t/julia-1-8-3-and-1-9-0-alpha1-have-been-released/90418 "2022-11-17T22:03:42Z")

</div>

The Julia developers are pleased to announce two new releases: v1.8.3, the third patch release in the 1.8 stable series, and v1.9.0-alpha1, the first alpha version for the upcoming 1.9 stable series. You can download bin…

---

## [Union{T,Nothing} vs multiple dispatch](https://discourse.julialang.org/t/union-t-nothing-vs-multiple-dispatch/90414)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 8\
**Last updated:** [November 17, 2022, 9:39pm UTC](https://discourse.julialang.org/t/union-t-nothing-vs-multiple-dispatch/90414 "2022-11-17T21:39:32Z")

</div>

For performance reasons, it is advised to avoid Unions. But on the topic of Nothing, the documentation suggests the compiler will emit efficient code. Is it preferred to use multiple dispatch, i.e., have two versions of …

---

## [DDS package?](https://discourse.julialang.org/t/dds-package/8429)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 9:31pm UTC](https://discourse.julialang.org/t/dds-package/8429 "2022-11-17T21:31:27Z")

</div>

Im curious if anyone {is interested in, has considered, has attempted, has succeeded in} creating a Julia package that wraps one of the implementations of DDS. If not, it seems like in principle this should be possible,…

---

## [Matrix to row vector](https://discourse.julialang.org/t/matrix-to-row-vector/90417)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 9:22pm UTC](https://discourse.julialang.org/t/matrix-to-row-vector/90417 "2022-11-17T21:22:31Z")

</div>

Hello all, I have two matrices A = \[1 1 1; 1 1 1; 1 1 1\] B = \[1; 2; 3\] I want to multiply both of them row by row, meaning the answer should be A.\*B = \[1 1 1; 2 2 2; 3 3 3\] Now I want to covert this matrix to a row …

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

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