# Latest

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

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

**Page:** 965

---

## [Preallocate an array with the element type, which is unknow before running?](https://discourse.julialang.org/t/preallocate-an-array-with-the-element-type-which-is-unknow-before-running/85162)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 12:53pm UTC](https://discourse.julialang.org/t/preallocate-an-array-with-the-element-type-which-is-unknow-before-running/85162 "2022-08-02T12:53:23Z")

</div>

In some situation, I need to preallocate an array, but the element type is not fixed until running. Here is a example: struct Test{T} a::T #some function n::Int end function (test::Test)(data::AbstractArray) …

---

## [Gradient Descent, each datapoint is an array, in Flux](https://discourse.julialang.org/t/gradient-descent-each-datapoint-is-an-array-in-flux/85158)

<div class="topic-metadata">

**Author:** [@Rohan\_Rajagopal](https://discourse.julialang.org/u/Rohan_Rajagopal)\
**Replies:** 0\
**Last updated:** [August 2, 2022, 12:10pm UTC](https://discourse.julialang.org/t/gradient-descent-each-datapoint-is-an-array-in-flux/85158 "2022-08-02T12:10:01Z")

</div>

I have been trying to use Flux.jl library for simple Machine learning. But in my case, my each data point is an array of some fixed length greater than 1000. And so I haven’t been able to convert the following basic grad…

---

## [Linearizing ModelingToolkit ODESystem](https://discourse.julialang.org/t/linearizing-modelingtoolkit-odesystem/61387)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 3\
**Last updated:** [August 2, 2022, 11:58am UTC](https://discourse.julialang.org/t/linearizing-modelingtoolkit-odesystem/61387 "2022-08-02T11:58:48Z")

</div>

I am having my bi-monthly go at ModelingToolkit and have reached a point where I can create an ODESystem from ControlSystems.jl StateSpace and connect a few of those togeher and simulate, nice :slight\_smile: As a next s…

---

## [Advice on smart multi-threading to minimize calling an expensive function](https://discourse.julialang.org/t/advice-on-smart-multi-threading-to-minimize-calling-an-expensive-function/85152)

<div class="topic-metadata">

**Author:** [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)\
**Replies:** 0\
**Last updated:** [August 2, 2022, 9:31am UTC](https://discourse.julialang.org/t/advice-on-smart-multi-threading-to-minimize-calling-an-expensive-function/85152 "2022-08-02T09:31:53Z")

</div>

Hey all! :slight\_smile: I have been struggling a few days now on how to approach this. I have a set of query arrays and a set of reference arrays and I want to compare them. I do this via an index, which is expensive to…

---

## [How to plot quiver plot over heatmap](https://discourse.julialang.org/t/how-to-plot-quiver-plot-over-heatmap/66000)

<div class="topic-metadata">

**Author:** [@meck](https://discourse.julialang.org/u/meck)\
**Replies:** 3\
**Last updated:** [August 2, 2022, 11:23am UTC](https://discourse.julialang.org/t/how-to-plot-quiver-plot-over-heatmap/66000 "2022-08-02T11:23:40Z")

</div>

I am trying to plot a quiver plot (a vector field) over a heatmap. My only reference after one day of research is this old notebook: https://github.com/JuliaPlots/ExamplePlots.jl/blob/master/notebooks/quiver.ipynb My fu…

---

## [Different performance between reduce(map()) and mapreduce()](https://discourse.julialang.org/t/different-performance-between-reduce-map-and-mapreduce/85149)

<div class="topic-metadata">

**Author:** [@gwlagerweij](https://discourse.julialang.org/u/gwlagerweij)\
**Replies:** 7\
**Last updated:** [August 2, 2022, 10:55am UTC](https://discourse.julialang.org/t/different-performance-between-reduce-map-and-mapreduce/85149 "2022-08-02T10:55:01Z")

</div>

Hi all, I want to create an array of indices (for creation of a sparse matrix in a later stage) based on a list of element connectivity as follows: N = 10000; # Number of elements ele…

---

## [How to open graph in new window in vs code](https://discourse.julialang.org/t/how-to-open-graph-in-new-window-in-vs-code/85155)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 1\
**Last updated:** [August 2, 2022, 10:54am UTC](https://discourse.julialang.org/t/how-to-open-graph-in-new-window-in-vs-code/85155 "2022-08-02T10:54:14Z")

</div>

how to open graph in new window in vs code

---

## [getfield(::Dict,val)](https://discourse.julialang.org/t/getfield-dict-val/85150)

<div class="topic-metadata">

**Author:** [@Atiyah](https://discourse.julialang.org/u/Atiyah)\
**Replies:** 3\
**Last updated:** [August 2, 2022, 9:41am UTC](https://discourse.julialang.org/t/getfield-dict-val/85150 "2022-08-02T09:41:54Z")

</div>

The following code (from here) Base.getproperty(d::Dict, s::Symbol) = s ∈ fieldnames(Dict) ? getfield(d, s) : getindex(d, s) makes a dictionary key symbols accessible like a struct fields, i.e. julia\> D = Dict(:a=\>1,…

---

## [Cylinder contact detection](https://discourse.julialang.org/t/cylinder-contact-detection/85145)

<div class="topic-metadata">

**Author:** [@frogdog](https://discourse.julialang.org/u/frogdog)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 9:37am UTC](https://discourse.julialang.org/t/cylinder-contact-detection/85145 "2022-08-02T09:37:33Z")

</div>

Is there a package that deals with contact search/contact detection? I want to check for collision between two 3D cylinders, and there are a bunch of edge cases that are a bit tricky to code, so I was hoping there exist…

---

## [Call graph generator for Julia](https://discourse.julialang.org/t/call-graph-generator-for-julia/5822)

<div class="topic-metadata">

**Author:** [@Marek\_Kukan](https://discourse.julialang.org/u/Marek_Kukan)\
**Replies:** 7\
**Last updated:** [August 2, 2022, 8:52am UTC](https://discourse.julialang.org/t/call-graph-generator-for-julia/5822 "2022-08-02T08:52:31Z")

</div>

Is there a tool for generating call graph from Julia source code files? Something like this:

---

## [Agent Based Modeling resources other than Agents.jl documentation](https://discourse.julialang.org/t/agent-based-modeling-resources-other-than-agents-jl-documentation/85035)

<div class="topic-metadata">

**Author:** [@franfram](https://discourse.julialang.org/u/franfram)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 8:39am UTC](https://discourse.julialang.org/t/agent-based-modeling-resources-other-than-agents-jl-documentation/85035 "2022-08-02T08:39:32Z")

</div>

Hello everyone. I’m starting to use Agents.jl for a PhD project on animal movement and epidemiology. I was wondering if anyone knew of additional resources to learn other than those of Agents.jl. George Datseris youtu…

---

## [Nested data structure with value by reference](https://discourse.julialang.org/t/nested-data-structure-with-value-by-reference/85147)

<div class="topic-metadata">

**Author:** [@Thomberger](https://discourse.julialang.org/u/Thomberger)\
**Replies:** 0\
**Last updated:** [August 2, 2022, 8:24am UTC](https://discourse.julialang.org/t/nested-data-structure-with-value-by-reference/85147 "2022-08-02T08:24:54Z")

</div>

I would like to have nested structure with minimum memory allocation. This would need passing data by reference but i’m not able to enforce that explicitly. I have a small number (i.e. 5) of different geometries. Each g…

---

## [Is there any way to optimize array additions and multiplications with transposes?](https://discourse.julialang.org/t/is-there-any-way-to-optimize-array-additions-and-multiplications-with-transposes/80268)

<div class="topic-metadata">

**Author:** [@Geositta](https://discourse.julialang.org/u/Geositta)\
**Replies:** 27\
**Last updated:** [August 2, 2022, 8:06am UTC](https://discourse.julialang.org/t/is-there-any-way-to-optimize-array-additions-and-multiplications-with-transposes/80268 "2022-08-02T08:06:32Z")

</div>

The question is related to python - Optimizing array additions and multiplications with transposes - Stack Overflow Given A is an array, I want to evaluate sum += p(A) \* factor(p) where p is a permutation/transpose, fa…

---

## [Plot Vectors with CalculusWithJulia Package is not Working in JupyterNotebook](https://discourse.julialang.org/t/plot-vectors-with-calculuswithjulia-package-is-not-working-in-jupyternotebook/85053)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 13\
**Last updated:** [August 2, 2022, 7:33am UTC](https://discourse.julialang.org/t/plot-vectors-with-calculuswithjulia-package-is-not-working-in-jupyternotebook/85053 "2022-08-02T07:33:10Z")

</div>

Hi all, I am using CalculusWithJulia, it works and showing the plot of vectors addition when I use the REPL. But when I use Jupyter Notebook, it does not work. I install the sympy by pip install sympy but it is not rec…

---

## [Is there a package to list memory consumption of selected data objects?](https://discourse.julialang.org/t/is-there-a-package-to-list-memory-consumption-of-selected-data-objects/85019)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 14\
**Last updated:** [August 2, 2022, 6:16am UTC](https://discourse.julialang.org/t/is-there-a-package-to-list-memory-consumption-of-selected-data-objects/85019 "2022-08-02T06:16:27Z")

</div>

I could use a package that could look at a variable and compute the true memory used by the pointed-to data object. Is there anything like this?

---

## [IJulia package installation error](https://discourse.julialang.org/t/ijulia-package-installation-error/85142)

<div class="topic-metadata">

**Author:** [@Sri\_Kish](https://discourse.julialang.org/u/Sri_Kish)\
**Replies:** 1\
**Last updated:** [August 2, 2022, 6:16am UTC](https://discourse.julialang.org/t/ijulia-package-installation-error/85142 "2022-08-02T06:16:16Z")

</div>

Hello, I am unable to download package “IJulia”. While attempting, i get following error “ERROR: failed to clone from GitHub - JuliaRegistries/General: The official registry of general Julia packages, error: GitError(C…

---

## [TensorsOperations, lookups and functions](https://discourse.julialang.org/t/tensorsoperations-lookups-and-functions/85140)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 6:00am UTC](https://discourse.julialang.org/t/tensorsoperations-lookups-and-functions/85140 "2022-08-02T06:00:17Z")

</div>

is there functionality like TensorOperations that supports functions and named lookups? I have an array of deals. Each specifies a curve, and needs to be valued over many simulated iterations of the curve. I’d like to w…

---

## [Are there any interesting visualization examples in Julia？](https://discourse.julialang.org/t/are-there-any-interesting-visualization-examples-in-julia/62661)

<div class="topic-metadata">

**Author:** [@Wind](https://discourse.julialang.org/u/Wind)\
**Replies:** 16\
**Last updated:** [August 2, 2022, 5:37am UTC](https://discourse.julialang.org/t/are-there-any-interesting-visualization-examples-in-julia/62661 "2022-08-02T05:37:48Z")

</div>

I found a web page with a lot of dazzling and interesting javascript visualization examples. It’s true that programming language is the best drawing tool. Since Julia is very fast and easy to use, I assume it can do a l…

---

## [How to Draw Pie Chart in this Subplots with PyplotJS?](https://discourse.julialang.org/t/how-to-draw-pie-chart-in-this-subplots-with-pyplotjs/85033)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 5:16am UTC](https://discourse.julialang.org/t/how-to-draw-pie-chart-in-this-subplots-with-pyplotjs/85033 "2022-08-02T05:16:24Z")

</div>

Hi all, I see this source https://plotly.com/julia/mixed-subplots/ This is my code (the pie chart is not working): using PlotlyJS, CSV, DataFrames, HTTP df = CSV.read("/home/browni/LasthrimProjection/csv/countrieshi…

---

## [Error loading CSV package in Jupyter Notebook](https://discourse.julialang.org/t/error-loading-csv-package-in-jupyter-notebook/85087)

<div class="topic-metadata">

**Author:** [@Debartha\_Paul](https://discourse.julialang.org/u/Debartha_Paul)\
**Replies:** 3\
**Last updated:** [August 2, 2022, 2:22am UTC](https://discourse.julialang.org/t/error-loading-csv-package-in-jupyter-notebook/85087 "2022-08-02T02:22:00Z")

</div>

I found a discrepancy in behaviour while loading the CSV package in Julia in a Jupyter notebook. I am currently learning Julia for Data Science from JuliaAcademy. Now, I am using Julia in Jupyter notebook inside Microsof…

---

## [How do I find if a variable is defined when I know the corresponding symbol, but not the name?](https://discourse.julialang.org/t/how-do-i-find-if-a-variable-is-defined-when-i-know-the-corresponding-symbol-but-not-the-name/85132)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 1:37am UTC](https://discourse.julialang.org/t/how-do-i-find-if-a-variable-is-defined-when-i-know-the-corresponding-symbol-but-not-the-name/85132 "2022-08-02T01:37:42Z")

</div>

I have a variable a that is defined: a = 1 I can check whether a is defined @isdefined a # true Some other variables may or not be defined at this point in the program: @isdefined b # false However, I only have ava…

---

## [Is this a bug](https://discourse.julialang.org/t/is-this-a-bug/85130)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 1\
**Last updated:** [August 1, 2022, 11:45pm UTC](https://discourse.julialang.org/t/is-this-a-bug/85130 "2022-08-01T23:45:30Z")

</div>

a=1 for i in range(1,5) a=i\*a^i end now result is zero is this kind of bug

---

## [What does conda have to do with pluto notebooks?](https://discourse.julialang.org/t/what-does-conda-have-to-do-with-pluto-notebooks/85117)

<div class="topic-metadata">

**Author:** [@Xavier\_Gonzalez](https://discourse.julialang.org/u/Xavier_Gonzalez)\
**Replies:** 12\
**Last updated:** [August 1, 2022, 11:44pm UTC](https://discourse.julialang.org/t/what-does-conda-have-to-do-with-pluto-notebooks/85117 "2022-08-01T23:44:26Z")

</div>

I’m running Julia 1.7.3 on Windows 11. I’m trying to use Pluto notebooks. I try to run Pluto using julia using Pluto Pluto.run() Pluto still runs when I do this, but I get the most bizarre message as it’s firing up, …

---

## [Reading binary values from a file](https://discourse.julialang.org/t/reading-binary-values-from-a-file/84936)

<div class="topic-metadata">

**Author:** [@Schneeschaufel](https://discourse.julialang.org/u/Schneeschaufel)\
**Replies:** 3\
**Last updated:** [August 1, 2022, 10:35pm UTC](https://discourse.julialang.org/t/reading-binary-values-from-a-file/84936 "2022-08-01T22:35:09Z")

</div>

I saw the following code (http://www.samuelbosch.com/2014/07/benchmarking-reading-binary-values-from.html) and I was intrigued how close the structure resembles Scheme or Lisp code (I wrote something similar in Bigloo 2…

---

## [Record audio without data loss between save files | PortAudio.jl](https://discourse.julialang.org/t/record-audio-without-data-loss-between-save-files-portaudio-jl/85007)

<div class="topic-metadata">

**Author:** [@frsalarcon](https://discourse.julialang.org/u/frsalarcon)\
**Replies:** 1\
**Last updated:** [August 1, 2022, 10:09pm UTC](https://discourse.julialang.org/t/record-audio-without-data-loss-between-save-files-portaudio-jl/85007 "2022-08-01T22:09:05Z")

</div>

Hello everyone! I have a question, is there a way to record audio for example one minute through the following script using portaudio: import LibSndFile using PortAudio: PortAudioStream using SampledSignals: s using Fi…

---

## [Can't Authenticate on Firefox to manage packages](https://discourse.julialang.org/t/cant-authenticate-on-firefox-to-manage-packages/82111)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 6\
**Last updated:** [August 1, 2022, 9:38pm UTC](https://discourse.julialang.org/t/cant-authenticate-on-firefox-to-manage-packages/82111 "2022-08-01T21:38:08Z")

</div>

Hi, after a few months of inactivity, starting up again on a Julia program, I tried to add a new package, and was unable to authenticate on Firefox (or Microsoft Explorer either). The webpage did pop up as usual, but th…

---

## [Check how the documentation of package will be affected by a PR on GitHub](https://discourse.julialang.org/t/check-how-the-documentation-of-package-will-be-affected-by-a-pr-on-github/85118)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [August 1, 2022, 9:22pm UTC](https://discourse.julialang.org/t/check-how-the-documentation-of-package-will-be-affected-by-a-pr-on-github/85118 "2022-08-01T21:22:34Z")

</div>

I have a PR to a Julia package (Update with BifurcationKit by TorkelE · Pull Request #539 · SciML/Catalyst.jl · GitHub) that will change the documentation (Home · Catalyst.jl). Is there some good way to check how the do…

---

## [Should model matrix for nested factors be full-rank?](https://discourse.julialang.org/t/should-model-matrix-for-nested-factors-be-full-rank/84733)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 15\
**Last updated:** [August 1, 2022, 8:45pm UTC](https://discourse.julialang.org/t/should-model-matrix-for-nested-factors-be-full-rank/84733 "2022-08-01T20:45:00Z")

</div>

In some cases when levels of one factor all “inside” levels of another we have not full-rank model matrix from StatsModels. For example - calssical bioequivlence crossover study (2X2) with factors: Var ~ Formulation + …

---

## [\--track-allocation and @threads](https://discourse.julialang.org/t/track-allocation-and-threads/84729)

<div class="topic-metadata">

**Author:** [@jwake](https://discourse.julialang.org/u/jwake)\
**Replies:** 10\
**Last updated:** [August 1, 2022, 7:57pm UTC](https://discourse.julialang.org/t/track-allocation-and-threads/84729 "2022-08-01T19:57:54Z")

</div>

Essentially, I call a function within nested loops. In serial, no heap allocations occur within the function. When run on multiple threads via @threads, allocations are reported within the function. Because the thread…

---

## [Makie inconsistency between GLMakie output and saved mp4 output](https://discourse.julialang.org/t/makie-inconsistency-between-glmakie-output-and-saved-mp4-output/85112)

<div class="topic-metadata">

**Author:** [@gottacatchenall](https://discourse.julialang.org/u/gottacatchenall)\
**Replies:** 0\
**Last updated:** [August 1, 2022, 6:37pm UTC](https://discourse.julialang.org/t/makie-inconsistency-between-glmakie-output-and-saved-mp4-output/85112 "2022-08-01T18:37:41Z")

</div>

Hi, I’m running the following code to create an animation with two axes within a figure. using Makie, GLMakie using Distributions fig = Figure(resolution=(1600,800)) ax1 = Axis(fig\[1,1\], title="Sampling Locations"…

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

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