# Latest

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

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

**Page:** 1135

---

## [Smallest magnitude eigenvalues of the generalized eigenvalue equation for a large sparse matrix](https://discourse.julialang.org/t/smallest-magnitude-eigenvalues-of-the-generalized-eigenvalue-equation-for-a-large-sparse-matrix/75485)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 20\
**Last updated:** [February 2, 2022, 12:05pm UTC](https://discourse.julialang.org/t/smallest-magnitude-eigenvalues-of-the-generalized-eigenvalue-equation-for-a-large-sparse-matrix/75485 "2022-02-02T12:05:42Z")

</div>

I have a generalized eigenvalue problem Hx=\\lambda S x to solve, where H is Hermitian and S is positive definite. Both H and S are sparse matrices and their dimensions (size(H, 1)) are on the order of 10^5. Roughly 1% of…

---

## [How to get a matrix with the inverse of each element of another matrix?](https://discourse.julialang.org/t/how-to-get-a-matrix-with-the-inverse-of-each-element-of-another-matrix/75616)

<div class="topic-metadata">

**Author:** [@Casfooox](https://discourse.julialang.org/u/Casfooox)\
**Replies:** 9\
**Last updated:** [February 2, 2022, 10:55am UTC](https://discourse.julialang.org/t/how-to-get-a-matrix-with-the-inverse-of-each-element-of-another-matrix/75616 "2022-02-02T10:55:29Z")

</div>

I’m new to Julia. Is there an easy way of getting a matrix with the inverses of each element in a matrix? So an element of the new matrix would be: B\_ij = 1/A\_ij I have seen that at least in Julia 0.2.0 the following s…

---

## [How to compute algorithm complexity?](https://discourse.julialang.org/t/how-to-compute-algorithm-complexity/75638)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 10:41am UTC](https://discourse.julialang.org/t/how-to-compute-algorithm-complexity/75638 "2022-02-02T10:41:52Z")

</div>

I know nothing of computational theory, if not that sometimes you come across to some “big O” notation to rank algorithm efficiency. How do I compute this “big O” notation for the two implementations of prime number gen…

---

## [Generate Julia expressions with Symbolics](https://discourse.julialang.org/t/generate-julia-expressions-with-symbolics/75528)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 8:30am UTC](https://discourse.julialang.org/t/generate-julia-expressions-with-symbolics/75528 "2022-02-02T08:30:26Z")

</div>

Dear all, I’m starting with Symbolics.jl, however I’m stuck with a basic functionality. I often use sympy to generate some text expressions that I then copy/paste in either C, MATLAB or Julia codes. I was wondering how…

---

## [What is our equivalent of numpy.argpartition?](https://discourse.julialang.org/t/what-is-our-equivalent-of-numpy-argpartition/75626)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 7:32am UTC](https://discourse.julialang.org/t/what-is-our-equivalent-of-numpy-argpartition/75626 "2022-02-02T07:32:27Z")

</div>

What is the julia equivalent of numpy’s argpartition? Here is how it works: Let’s say you want to get the indices of the top five entries of an array. As an example, say I have probabilites of n events stored in an ar…

---

## [Is it possible to store the result of a distribution function at an instant in an array?](https://discourse.julialang.org/t/is-it-possible-to-store-the-result-of-a-distribution-function-at-an-instant-in-an-array/75620)

<div class="topic-metadata">

**Author:** [@CentraCep](https://discourse.julialang.org/u/CentraCep)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 7:06am UTC](https://discourse.julialang.org/t/is-it-possible-to-store-the-result-of-a-distribution-function-at-an-instant-in-an-array/75620 "2022-02-02T07:06:14Z")

</div>

Is there a way one can store the instantaneous results of a probability distribution function (like the ones in Distributions.jl into a data structure? Here is how my code is set up right now attempting to do this: dt =…

---

## [How to get the full history of step sizes and coefficients](https://discourse.julialang.org/t/how-to-get-the-full-history-of-step-sizes-and-coefficients/75597)

<div class="topic-metadata">

**Author:** [@1115](https://discourse.julialang.org/u/1115)\
**Replies:** 3\
**Last updated:** [February 2, 2022, 5:06am UTC](https://discourse.julialang.org/t/how-to-get-the-full-history-of-step-sizes-and-coefficients/75597 "2022-02-02T05:06:16Z")

</div>

Regarding to solving an ordinary differential equation f(u, t) with OrdinaryDiffEq.jl. Is it possible to store time steps as times and coefficients as coeffs so that one can replay the integration as for k=1:K u += …

---

## [Collect trace indices meeting condition](https://discourse.julialang.org/t/collect-trace-indices-meeting-condition/75531)

<div class="topic-metadata">

**Author:** [@Mo-Gul](https://discourse.julialang.org/u/Mo-Gul)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 4:42am UTC](https://discourse.julialang.org/t/collect-trace-indices-meeting-condition/75531 "2022-02-02T04:42:06Z")

</div>

Continuing the discussion from Change each trace meeting condition in PlotyJS plot: Now I understand that the second argument in restyle! can’t just be a single index, but also a vector of indices. So my question this t…

---

## [Avoiding \`readavailable()\` when communicating with long-lived external program](https://discourse.julialang.org/t/avoiding-readavailable-when-communicating-with-long-lived-external-program/61611)

<div class="topic-metadata">

**Author:** [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Replies:** 26\
**Last updated:** [February 2, 2022, 3:42am UTC](https://discourse.julialang.org/t/avoiding-readavailable-when-communicating-with-long-lived-external-program/61611 "2022-02-02T03:42:31Z")

</div>

I would like to ask for comments and suggestions on my solution to the following problem. I maintain a frontend to gnuplot, which implements the following plotting process: Run gnuplot and connect to it via stdin, stdo…

---

## [SciFracX organization — Fractional Order Computing and Modeling](https://discourse.julialang.org/t/scifracx-organization-fractional-order-computing-and-modeling/75614)

<div class="topic-metadata">

**Author:** [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Replies:** 2\
**Last updated:** [February 2, 2022, 3:40am UTC](https://discourse.julialang.org/t/scifracx-organization-fractional-order-computing-and-modeling/75614 "2022-02-02T03:40:24Z")

</div>

Hello guys! Happy Chinese new year🐯!! I am very excited to announce a new community—SciFracX, focus on making fractional order computing and modeling easier with Julia! There are some packages related to fractional ord…

---

## [Is there a function for the inverse of \`ismissing()\`](https://discourse.julialang.org/t/is-there-a-function-for-the-inverse-of-ismissing/75575)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 18\
**Last updated:** [February 2, 2022, 2:20am UTC](https://discourse.julialang.org/t/is-there-a-function-for-the-inverse-of-ismissing/75575 "2022-02-02T02:20:40Z")

</div>

Hi all, Is there a function that returns the inverse of ismissing()? Obviously, I can use ismissing(foo) == false but it seems not elegant. Thanks!

---

## [\[ANN\] ThreadsX.jl: Parallelized Base functions](https://discourse.julialang.org/t/ann-threadsx-jl-parallelized-base-functions/36666)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 63\
**Last updated:** [February 2, 2022, 12:44am UTC](https://discourse.julialang.org/t/ann-threadsx-jl-parallelized-base-functions/36666 "2022-02-02T00:44:34Z")

</div>

ThreadsX.jl is aiming at providing API compatible with Base functions optimized for multicore machines. tl;dr Quoting tl;dr section of README: Add prefix ThreadsX. to functions from Base to get some speedup, if suppor…

---

## [ArchGDAL Convexhull not return a polygon](https://discourse.julialang.org/t/archgdal-convexhull-not-return-a-polygon/75609)

<div class="topic-metadata">

**Author:** [@ZWJZ9](https://discourse.julialang.org/u/ZWJZ9)\
**Replies:** 1\
**Last updated:** [February 2, 2022, 12:35am UTC](https://discourse.julialang.org/t/archgdal-convexhull-not-return-a-polygon/75609 "2022-02-02T00:35:52Z")

</div>

Hello Everyone, I am new to julia and currently using ArchGDAL. Currently, I want to compute a convex hull for a lot of points. When I using AG.convexhull, and save the result to a shapefile using GeoDataFrames. When I …

---

## [Rust / Julia Comparison Post](https://discourse.julialang.org/t/rust-julia-comparison-post/75403)

<div class="topic-metadata">

**Author:** [@johnmyleswhite](https://discourse.julialang.org/u/johnmyleswhite)\
**Replies:** 56\
**Last updated:** [February 1, 2022, 11:38pm UTC](https://discourse.julialang.org/t/rust-julia-comparison-post/75403 "2022-02-01T23:38:10Z")

</div>

This post is on Hacker News right now – it seems worth digging in to understand why Rust does so much better here given that the code seem like a fairly naive port without much optimization effort: Julia Rust

---

## [Need resource for worked examples for simple things](https://discourse.julialang.org/t/need-resource-for-worked-examples-for-simple-things/75579)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 8\
**Last updated:** [February 1, 2022, 10:56pm UTC](https://discourse.julialang.org/t/need-resource-for-worked-examples-for-simple-things/75579 "2022-02-01T22:56:23Z")

</div>

Hi all working my way through the high level concepts and hitting a stumbling block. My first inclination is to look at a simple worked example and figure out what I don’t understand. So an example is that I wanted to l…

---

## [Plots PyPlot backend issue](https://discourse.julialang.org/t/plots-pyplot-backend-issue/75608)

<div class="topic-metadata">

**Author:** [@vepiteski](https://discourse.julialang.org/u/vepiteski)\
**Replies:** 0\
**Last updated:** [February 1, 2022, 10:52pm UTC](https://discourse.julialang.org/t/plots-pyplot-backend-issue/75608 "2022-02-01T22:52:19Z")

</div>

Hi Using the pyplot backend triggered segmentation fault in the REPL. After uninstalling everything related to Plots and PyPlot, trying fresh environments, I reluctantly reinstalled ALL my julia setup from scratch. Now…

---

## [Improve performance of a code with very large % of Garbage Collection](https://discourse.julialang.org/t/improve-performance-of-a-code-with-very-large-of-garbage-collection/75548)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 19\
**Last updated:** [February 1, 2022, 10:31pm UTC](https://discourse.julialang.org/t/improve-performance-of-a-code-with-very-large-of-garbage-collection/75548 "2022-02-01T22:31:13Z")

</div>

Hello, I am trying to squeeze performance of the following code as much as possible. When I benchmark it, I get a very large number for the garbage collection statistic (see below). Does anyone have any recommendation fo…

---

## [UnionAll as a Type Parameter](https://discourse.julialang.org/t/unionall-as-a-type-parameter/75585)

<div class="topic-metadata">

**Author:** [@RGon](https://discourse.julialang.org/u/RGon)\
**Replies:** 3\
**Last updated:** [February 1, 2022, 9:56pm UTC](https://discourse.julialang.org/t/unionall-as-a-type-parameter/75585 "2022-02-01T21:56:58Z")

</div>

I’m trying to build a structure that separates parametric types (UnionAll) into three categories (Gaussian Alarms, Gaussian Observations, and Reset Observations). I regularly deal with many different UnionAll types. I tr…

---

## [Performance of custom \`Vec\` type versus \`SVector{3, Float64}\`](https://discourse.julialang.org/t/performance-of-custom-vec-type-versus-svector-3-float64/75594)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 4\
**Last updated:** [February 1, 2022, 7:47pm UTC](https://discourse.julialang.org/t/performance-of-custom-vec-type-versus-svector-3-float64/75594 "2022-02-01T19:47:05Z")

</div>

I’m having trouble replicating the performance of SVector{3, Float64} with my own custom Vec type. Here’s the code: using LinearAlgebra using StaticArrays using BenchmarkTools struct Vec x::Float64 y::Float64 …

---

## [How to control threads in combination of LoopVectorization and @spawn](https://discourse.julialang.org/t/how-to-control-threads-in-combination-of-loopvectorization-and-spawn/75466)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 6\
**Last updated:** [February 1, 2022, 7:26pm UTC](https://discourse.julialang.org/t/how-to-control-threads-in-combination-of-loopvectorization-and-spawn/75466 "2022-02-01T19:26:56Z")

</div>

I am having a simple test program to learn how to divide work over threads. If I launch with one thread, the output is: ──────────────────────────────────────────────────────────────────── Ti…

---

## [Starter example in JuMP](https://discourse.julialang.org/t/starter-example-in-jump/75570)

<div class="topic-metadata">

**Author:** [@tonyhur](https://discourse.julialang.org/u/tonyhur)\
**Replies:** 4\
**Last updated:** [February 1, 2022, 7:24pm UTC](https://discourse.julialang.org/t/starter-example-in-jump/75570 "2022-02-01T19:24:57Z")

</div>

I tested JuMP some times ago an everything went perfect. Now when I retry the small model at: https://jump.dev/JuMP.jl/stable/tutorials/getting\_started/getting\_started\_with\_JuMP/ I get an error model = Model(GLPK.Opti…

---

## [Function for creating a neural network with n hidden layers in Flux](https://discourse.julialang.org/t/function-for-creating-a-neural-network-with-n-hidden-layers-in-flux/75589)

<div class="topic-metadata">

**Author:** [@Handam](https://discourse.julialang.org/u/Handam)\
**Replies:** 1\
**Last updated:** [February 1, 2022, 6:08pm UTC](https://discourse.julialang.org/t/function-for-creating-a-neural-network-with-n-hidden-layers-in-flux/75589 "2022-02-01T18:08:18Z")

</div>

Hi, I want to create a function, where I can set the number of hidden layers with an argument. One option that kinda works is using Flux function make\_nn(length\_in = 80, length\_out = 1, nodes = 128, hid\_lay = 3, act\_fu…

---

## [Can't upload images (to this site)](https://discourse.julialang.org/t/cant-upload-images-to-this-site/75541)

<div class="topic-metadata">

**Author:** [@Mo-Gul](https://discourse.julialang.org/u/Mo-Gul)\
**Replies:** 2\
**Last updated:** [February 1, 2022, 6:06pm UTC](https://discourse.julialang.org/t/cant-upload-images-to-this-site/75541 "2022-02-01T18:06:49Z")

</div>

Unfortunately I can’t upload an image (to this site). Whenever I try I receive the error Sorry, there was an error uploading that file. Please try again. Do you have an idea what could be the root cause? My guess is …

---

## [Parallelizing a Nested Loop Concurrently](https://discourse.julialang.org/t/parallelizing-a-nested-loop-concurrently/75402)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 17\
**Last updated:** [February 1, 2022, 5:23pm UTC](https://discourse.julialang.org/t/parallelizing-a-nested-loop-concurrently/75402 "2022-02-01T17:23:03Z")

</div>

Hi! I am trying to code a problem in which I have two loops. An inner loop that a computes a sample average for a given agent using many many simulations of a particular function (which is not trivial, but each individua…

---

## [Mixed-mode automatic differentiation using ForwardDiff and ReverseDiff](https://discourse.julialang.org/t/mixed-mode-automatic-differentiation-using-forwarddiff-and-reversediff/74440)

<div class="topic-metadata">

**Author:** [@StevenWhitaker](https://discourse.julialang.org/u/StevenWhitaker)\
**Replies:** 9\
**Last updated:** [February 1, 2022, 5:22pm UTC](https://discourse.julialang.org/t/mixed-mode-automatic-differentiation-using-forwarddiff-and-reversediff/74440 "2022-02-01T17:22:19Z")

</div>

I need to take the gradient of a function. I can use ForwardDiff without any issues, but for part of my code I have found ReverseDiff to run much faster. The issue is that the other part of my code errors with ReverseDif…

---

## [Configuring Table of Contents with Books](https://discourse.julialang.org/t/configuring-table-of-contents-with-books/75578)

<div class="topic-metadata">

**Author:** [@jvaverka](https://discourse.julialang.org/u/jvaverka)\
**Replies:** 3\
**Last updated:** [February 1, 2022, 4:52pm UTC](https://discourse.julialang.org/t/configuring-table-of-contents-with-books/75578 "2022-02-01T16:52:03Z")

</div>

Table of Contents Depth Is there a configuration to alter the Table of Contents Depth using Books.jl? I see that some options can be set in the metadata.yml. However, as commented, these only affect PDF output.

---

## [Half precision](https://discourse.julialang.org/t/half-precision/75580)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 2\
**Last updated:** [February 1, 2022, 4:15pm UTC](https://discourse.julialang.org/t/half-precision/75580 "2022-02-01T16:15:56Z")

</div>

Are there any plans to let people get to the hardware half precision formats (BFloat16 and Float16) in Apple silicon? I have a research interest in mixed precision solvers and would be very excited to stop doing half pre…

---

## [Is there a function that extracts the index from an element of a CategoricalArray created by the function \`cut\`?](https://discourse.julialang.org/t/is-there-a-function-that-extracts-the-index-from-an-element-of-a-categoricalarray-created-by-the-function-cut/75551)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 6\
**Last updated:** [February 1, 2022, 3:40pm UTC](https://discourse.julialang.org/t/is-there-a-function-that-extracts-the-index-from-an-element-of-a-categoricalarray-created-by-the-function-cut/75551 "2022-02-01T15:40:38Z")

</div>

The function cut in the CategoricalArray package returns a CategoricalArray object, as in this example: x = rand(10) ct = cut(x, 3) "Q3: \[0.735346, 0.972399\]" "Q2: \[0.335188, 0.735346)" "Q1: \[0.00586079, 0.335188)" …

---

## [Why do people think Plots doesn't produce publication-quality figure?](https://discourse.julialang.org/t/why-do-people-think-plots-doesnt-produce-publication-quality-figure/75430)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 18\
**Last updated:** [February 1, 2022, 1:01pm UTC](https://discourse.julialang.org/t/why-do-people-think-plots-doesnt-produce-publication-quality-figure/75430 "2022-02-01T13:01:22Z")

</div>

in the previous thread I complained about the default plot style of Plots is not good (Why Plots.jl produce figures looks not as good as other packages even with pyplot) Then I received some people lecturing me about th…

---

## [DataFrame join rename multiple columns in join command](https://discourse.julialang.org/t/dataframe-join-rename-multiple-columns-in-join-command/75574)

<div class="topic-metadata">

**Author:** [@korilium](https://discourse.julialang.org/u/korilium)\
**Replies:** 1\
**Last updated:** [February 1, 2022, 1:02pm UTC](https://discourse.julialang.org/t/dataframe-join-rename-multiple-columns-in-join-command/75574 "2022-02-01T13:02:46Z")

</div>

So i want to outerjoin three dataframes and rename their columns at the same time. Here is the code that I try to do using DataFramesMeta, Dates, Plots, DataFrames, MarketData, PyCall start = DateTime(2018,1,1) IBCI =…

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

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