# Latest

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

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

**Page:** 1218

---

## [Multithreading problem](https://discourse.julialang.org/t/multithreading-problem/70357)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 10\
**Last updated:** [November 4, 2021, 12:03pm UTC](https://discourse.julialang.org/t/multithreading-problem/70357 "2021-11-04T12:03:13Z")

</div>

This is my first time trying to use multithreading for real work. I have an inner loop in my code for doing sinc interpolation of a recorded time history file. A minimum working example is # Minumum working example fo…

---

## [Differentiate through solve for a subset of parameters](https://discourse.julialang.org/t/differentiate-through-solve-for-a-subset-of-parameters/70869)

<div class="topic-metadata">

**Author:** [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Replies:** 5\
**Last updated:** [November 4, 2021, 11:07am UTC](https://discourse.julialang.org/t/differentiate-through-solve-for-a-subset-of-parameters/70869 "2021-11-04T11:07:33Z")

</div>

If I pass a vector of dual numbers as parameters, the solver will recocnize the dual numbers and provide a vector dx\<:Vector{Dual...} to my diff eq function. In my problem I have several parameters I want to tune but a…

---

## [Tridiagonal Toeplitz matrix complex eigenvalues instead of real](https://discourse.julialang.org/t/tridiagonal-toeplitz-matrix-complex-eigenvalues-instead-of-real/70892)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 7\
**Last updated:** [November 4, 2021, 10:08am UTC](https://discourse.julialang.org/t/tridiagonal-toeplitz-matrix-complex-eigenvalues-instead-of-real/70892 "2021-11-04T10:08:17Z")

</div>

The spectrum of tridiagonal Toeplitz matrices is known analytically (Tridiagonal-Toeplitz-Matrix – Wikipedia) and is (for non-zero off-diagonals) simple and real. Julia’s eigen function returns for small non-symmetric To…

---

## [Always display the methods definition when displaying the documentation](https://discourse.julialang.org/t/always-display-the-methods-definition-when-displaying-the-documentation/70921)

<div class="topic-metadata">

**Author:** [@tencnivel](https://discourse.julialang.org/u/tencnivel)\
**Replies:** 1\
**Last updated:** [November 4, 2021, 10:06am UTC](https://discourse.julialang.org/t/always-display-the-methods-definition-when-displaying-the-documentation/70921 "2021-11-04T10:06:26Z")

</div>

By default, if a function has a docstring, only the content of the docstring is displayed. I would like to always have the description of the methods when displaying the documentation of a function. In the way that Juno…

---

## [Linking error (?) with libz.so when precompiling Plots.jl](https://discourse.julialang.org/t/linking-error-with-libz-so-when-precompiling-plots-jl/70886)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 3\
**Last updated:** [November 4, 2021, 9:56am UTC](https://discourse.julialang.org/t/linking-error-with-libz-so-when-precompiling-plots-jl/70886 "2021-11-04T09:56:54Z")

</div>

I’ve had this problem on a couple of HPC clusters (where the system libraries are relatively old). When trying to install/precompile Plots.jl, there’s an error because the system-provided libz.so is not version 1.2.9 (se…

---

## [Alternative to very time-consuming array operations](https://discourse.julialang.org/t/alternative-to-very-time-consuming-array-operations/70620)

<div class="topic-metadata">

**Author:** [@anneJulia](https://discourse.julialang.org/u/anneJulia)\
**Replies:** 9\
**Last updated:** [November 4, 2021, 8:44am UTC](https://discourse.julialang.org/t/alternative-to-very-time-consuming-array-operations/70620 "2021-11-04T08:44:24Z")

</div>

I am writing a function where array operations, such as the example below, have to happen a few hundred thousand times. arr = \[1,0,0,1,1\] idx = \[2,4\] res = arr\[idx\] When using a profiler to analyse the code 89.69% of …

---

## [Explanation of the @. syntax](https://discourse.julialang.org/t/explanation-of-the-syntax/70826)

<div class="topic-metadata">

**Author:** [@jsevo](https://discourse.julialang.org/u/jsevo)\
**Replies:** 5\
**Last updated:** [November 4, 2021, 3:55am UTC](https://discourse.julialang.org/t/explanation-of-the-syntax/70826 "2021-11-04T03:55:26Z")

</div>

I came across this piece of syntax that was not immediately obvious to me. sum(@. (data \> 0.5) & (data \< 0.75)) / length(samples) I worked out that this is “mapping” the dot operator over all the other operators. I.e…

---

## [2 problems with Gaston.jl](https://discourse.julialang.org/t/2-problems-with-gaston-jl/70907)

<div class="topic-metadata">

**Author:** [@trg818](https://discourse.julialang.org/u/trg818)\
**Replies:** 3\
**Last updated:** [November 4, 2021, 12:46am UTC](https://discourse.julialang.org/t/2-problems-with-gaston-jl/70907 "2021-11-04T00:46:05Z")

</div>

As it doesn’t (yet?) seem to be possible to create a plot with two different x-axes and two different y-axes with Plots, I decided to give Gaston a try, because it would give me an interface to my good old Gnuplot, where…

---

## [Get distances of many points within a max range, any performance improvements?](https://discourse.julialang.org/t/get-distances-of-many-points-within-a-max-range-any-performance-improvements/70917)

<div class="topic-metadata">

**Author:** [@Jon\_Norberg](https://discourse.julialang.org/u/Jon_Norberg)\
**Replies:** 8\
**Last updated:** [November 3, 2021, 11:56pm UTC](https://discourse.julialang.org/t/get-distances-of-many-points-within-a-max-range-any-performance-improvements/70917 "2021-11-03T23:56:23Z")

</div>

I have a potentially very long (N) set of points W with three dimensions. I need to make distance based calculations between all points within a set max distance. Below is my best attempt so far. Any performance improvem…

---

## [MultivariateStats - Factor Analysis not working for the :cm method?](https://discourse.julialang.org/t/multivariatestats-factor-analysis-not-working-for-the-cm-method/70418)

<div class="topic-metadata">

**Author:** [@julio.ca2020](https://discourse.julialang.org/u/julio.ca2020)\
**Replies:** 1\
**Last updated:** [November 3, 2021, 10:48pm UTC](https://discourse.julialang.org/t/multivariatestats-factor-analysis-not-working-for-the-cm-method/70418 "2021-11-03T22:48:08Z")

</div>

I am doing a factor analysis and I’ve noticed that the method :em works in all cases but not the :cm (default). Why this? This works for example: using MultivariateStats X = \[0.635098 0.548183 0.211851 0.171408 0…

---

## [Design patterns for parameterizing by functions](https://discourse.julialang.org/t/design-patterns-for-parameterizing-by-functions/70891)

<div class="topic-metadata">

**Author:** [@ruairidh](https://discourse.julialang.org/u/ruairidh)\
**Replies:** 2\
**Last updated:** [November 3, 2021, 10:42pm UTC](https://discourse.julialang.org/t/design-patterns-for-parameterizing-by-functions/70891 "2021-11-03T22:42:03Z")

</div>

I often write code that is parameterized by a small set of related ‘inner’ functions (f, g,…). The functions are related in the sense that they all do different computations but they share some parameters. I include a s…

---

## [CSV.jl number of lines](https://discourse.julialang.org/t/csv-jl-number-of-lines/70785)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 13\
**Last updated:** [November 3, 2021, 9:36pm UTC](https://discourse.julialang.org/t/csv-jl-number-of-lines/70785 "2021-11-03T21:36:53Z")

</div>

I cannot use attribute “resusebuffer” in latest version of CSV.jl package. How can I calculate exact number of lines in CSV? function countcsvlines(file) n = 0 for row in CSV.Rows(file; resusebuffer=true) …

---

## [Julia indexing question](https://discourse.julialang.org/t/julia-indexing-question/70911)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 1\
**Last updated:** [November 3, 2021, 8:54pm UTC](https://discourse.julialang.org/t/julia-indexing-question/70911 "2021-11-03T20:54:54Z")

</div>

I have a matrix as below: A = \[1 2 3; 4 5 6\]; I need to find the index of those that meet these requirements Ind = map(A) do a (a \> 4) || (a \<3); end Here are the results: 2×3 Matrix{Bool}: 1 1 0 0 1 1 Ev…

---

## [Not possible connecting julia to atom](https://discourse.julialang.org/t/not-possible-connecting-julia-to-atom/70908)

<div class="topic-metadata">

**Author:** [@Louise](https://discourse.julialang.org/u/Louise)\
**Replies:** 3\
**Last updated:** [November 3, 2021, 8:22pm UTC](https://discourse.julialang.org/t/not-possible-connecting-julia-to-atom/70908 "2021-11-03T20:22:36Z")

</div>

Hey everyone! I installed Atom including all the relevant packages but i can’t connect it to Julia (julia itself works perfectly fine). I can’t even type anything into the REPL on Atom (there is a sad smiley - a screens…

---

## [Improving Performance of a Loop](https://discourse.julialang.org/t/improving-performance-of-a-loop/70905)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 9\
**Last updated:** [November 3, 2021, 8:12pm UTC](https://discourse.julialang.org/t/improving-performance-of-a-loop/70905 "2021-11-03T20:12:57Z")

</div>

Hi! I am trying to make the following function faster. Any suggestion would be very much appreciated. using Random using LinearAlgebra using BenchmarkTools ############################################################…

---

## [How to return the line that contains specific information from a file?](https://discourse.julialang.org/t/how-to-return-the-line-that-contains-specific-information-from-a-file/70889)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 7\
**Last updated:** [November 3, 2021, 8:03pm UTC](https://discourse.julialang.org/t/how-to-return-the-line-that-contains-specific-information-from-a-file/70889 "2021-11-03T20:03:30Z")

</div>

I have a read file (lets say eventually its name S and has the below data). How to return the locations (line and position in the line) that contains Hi world? #filehandle = open("$file"); #S = readlines(filehandle); #c…

---

## [Cannot load large CSV files with CSV.Read using M1, or M1 Pro?](https://discourse.julialang.org/t/cannot-load-large-csv-files-with-csv-read-using-m1-or-m1-pro/70498)

<div class="topic-metadata">

**Author:** [@Mitch](https://discourse.julialang.org/u/Mitch)\
**Replies:** 5\
**Last updated:** [November 3, 2021, 7:17pm UTC](https://discourse.julialang.org/t/cannot-load-large-csv-files-with-csv-read-using-m1-or-m1-pro/70498 "2021-11-03T19:17:20Z")

</div>

Does anyone else have issues loading large CSV files into Julia on the new Apple chips? I have to load smaller files sequentially first, otherwise the loading process never finishes?

---

## [Graph from Sparse Matrix](https://discourse.julialang.org/t/graph-from-sparse-matrix/70894)

<div class="topic-metadata">

**Author:** [@rachithaiyappa](https://discourse.julialang.org/u/rachithaiyappa)\
**Replies:** 2\
**Last updated:** [November 3, 2021, 6:39pm UTC](https://discourse.julialang.org/t/graph-from-sparse-matrix/70894 "2021-11-03T18:39:11Z")

</div>

How can I generate a Graph from a SparseMatrixCSC and then convert it into an undirected Light Graph?

---

## [Why is a, b = rand(2) so bad?](https://discourse.julialang.org/t/why-is-a-b-rand-2-so-bad/70859)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 9\
**Last updated:** [November 3, 2021, 5:46pm UTC](https://discourse.julialang.org/t/why-is-a-b-rand-2-so-bad/70859 "2021-11-03T17:46:10Z")

</div>

I am trying to find the Expected Value of maximum of two U\[0, 1\] RVs. Why is a call to rand(2) so much worse than two to rand(), rand()? julia\> function h(N) s = 0. for \_ in 1:N a, b…

---

## [Error message prints entire dataframe](https://discourse.julialang.org/t/error-message-prints-entire-dataframe/70883)

<div class="topic-metadata">

**Author:** [@k10](https://discourse.julialang.org/u/k10)\
**Replies:** 5\
**Last updated:** [November 3, 2021, 5:26pm UTC](https://discourse.julialang.org/t/error-message-prints-entire-dataframe/70883 "2021-11-03T17:26:12Z")

</div>

I encounter an error when i improperly attempt to use the length() function on a dataframe. The error message ends up printing the entire dataframe like so: Error: MethodError(length, (5189×16 DataFrame and then it pr…

---

## [Assigning values in for loop allocates memory](https://discourse.julialang.org/t/assigning-values-in-for-loop-allocates-memory/70851)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 3\
**Last updated:** [November 3, 2021, 5:00pm UTC](https://discourse.julialang.org/t/assigning-values-in-for-loop-allocates-memory/70851 "2021-11-03T17:00:28Z")

</div>

Why would that loop allocate anything at all? julia\> (M, N) = (512, 2048) A=zeros(M, N) v=zeros(M) @btime for k in 1:N v .= randn() A\[:, k\] = v end 2.502 ms (10756 allocat…

---

## [LaTeXStrings ArgumentError: regex message](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 5\
**Last updated:** [November 3, 2021, 4:44pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865 "2021-11-03T16:44:26Z")

</div>

Hi all, I have already submitted an issue to LaTeXStrings github site about this, but I do not know whether it is fine to ask here as well. If not, forgive me. I used to use LaTeXStrings seamlessly, but I guess (not su…

---

## [TimerOutputs and --track-allocation=user](https://discourse.julialang.org/t/timeroutputs-and-track-allocation-user/70884)

<div class="topic-metadata">

**Author:** [@Niceno](https://discourse.julialang.org/u/Niceno)\
**Replies:** 0\
**Last updated:** [November 3, 2021, 3:31pm UTC](https://discourse.julialang.org/t/timeroutputs-and-track-allocation-user/70884 "2021-11-03T15:31:15Z")

</div>

Dear all, I use TimerOutputs in my Julia code for profiling, but when I also want to check memory with --track-allocation=user option on start up, all the output is condensed in one line, the one with @timeit macro at t…

---

## [Can't start Julia language server in VS code](https://discourse.julialang.org/t/cant-start-julia-language-server-in-vs-code/70875)

<div class="topic-metadata">

**Author:** [@legedo](https://discourse.julialang.org/u/legedo)\
**Replies:** 0\
**Last updated:** [November 3, 2021, 1:42pm UTC](https://discourse.julialang.org/t/cant-start-julia-language-server-in-vs-code/70875 "2021-11-03T13:42:06Z")

</div>

Hi all! So I’m struggling with the following problem. I use VS code on an M1 macbook air. If I code using the jupyter notebook extension I can run the Julia Kernel (I’m using version 1.6.3). But I can’t make julia ru…

---

## [Sparse DataFrame](https://discourse.julialang.org/t/sparse-dataframe/64096)

<div class="topic-metadata">

**Author:** [@alexlenail](https://discourse.julialang.org/u/alexlenail)\
**Replies:** 9\
**Last updated:** [November 3, 2021, 1:39pm UTC](https://discourse.julialang.org/t/sparse-dataframe/64096 "2021-11-03T13:39:07Z")

</div>

DataFrame(sparse\_matrix) gives me: ArgumentError: a 'SparseMatrixCSC{Float64,Int64}' is not a table; see \`?Tables.table\` for ways to treat an AbstractMatrix as a table I can’t find documentation about how to load a spa…

---

## [Is Julia compatible with Mac OS Monterey?](https://discourse.julialang.org/t/is-julia-compatible-with-mac-os-monterey/70588)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 13\
**Last updated:** [November 3, 2021, 1:04pm UTC](https://discourse.julialang.org/t/is-julia-compatible-with-mac-os-monterey/70588 "2021-11-03T13:04:29Z")

</div>

I plan to upgrade my operating system to the latest Mac OS Monterey. Anyone knows if Julia is compatible with it? Many thanks.

---

## [How to check if my gridded X and Y are inside a polygon?](https://discourse.julialang.org/t/how-to-check-if-my-gridded-x-and-y-are-inside-a-polygon/70728)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 25\
**Last updated:** [November 3, 2021, 12:52pm UTC](https://discourse.julialang.org/t/how-to-check-if-my-gridded-x-and-y-are-inside-a-polygon/70728 "2021-11-03T12:52:08Z")

</div>

I have gridded X and Y that are defined by lon = 20:0.25:379.75; lat = -90:0.25:89.75; X, Y = ndgrid(lon, lat). My goal is to create a Boolean array (named Index) the same size as X (or Y) and their values should be …

---

## [Segfault when using promote\_typejoin to control small union behaviour over parametric type](https://discourse.julialang.org/t/segfault-when-using-promote-typejoin-to-control-small-union-behaviour-over-parametric-type/23666)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 0\
**Last updated:** [April 29, 2019, 7:54pm UTC](https://discourse.julialang.org/t/segfault-when-using-promote-typejoin-to-control-small-union-behaviour-over-parametric-type/23666 "2019-04-29T19:54:20Z")

</div>

I have a parametric type AtLeast{T}(x::T), and I’d like my broadcasts over vectors of Union{Float64, AtLeast} to propagate its type, instead of becoming Any. Following the discussion in this post, I do this: julia\> stru…

---

## [Why did the REPL window border disappear?](https://discourse.julialang.org/t/why-did-the-repl-window-border-disappear/70863)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 2\
**Last updated:** [November 3, 2021, 11:56am UTC](https://discourse.julialang.org/t/why-did-the-repl-window-border-disappear/70863 "2021-11-03T11:56:33Z")

</div>

I could not find a button to maximize the VSCode REPL window. So I used to drag the upper border of that window up and down when I needed more space for the REPL or more space for the editor window. This was a bit hard t…

---

## [Plotly.js - stacked bars in subplots](https://discourse.julialang.org/t/plotly-js-stacked-bars-in-subplots/60856)

<div class="topic-metadata">

**Author:** [@stej](https://discourse.julialang.org/u/stej)\
**Replies:** 6\
**Last updated:** [November 3, 2021, 10:53am UTC](https://discourse.julialang.org/t/plotly-js-stacked-bars-in-subplots/60856 "2021-11-03T10:53:29Z")

</div>

Hi all, I’m trying to plot stacked bars with PlotlyJS. It looks ok, when I use just one plot, but when I combine two plots together, the bars are no longer stacked. Example: using PlotlyJS, Dates dates = \[Date(2021, …

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

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