# Latest

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

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

**Page:** 776

---

## [Reverse-Mode AD VJP choices all failed](https://discourse.julialang.org/t/reverse-mode-ad-vjp-choices-all-failed/94929)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 7:03pm UTC](https://discourse.julialang.org/t/reverse-mode-ad-vjp-choices-all-failed/94929 "2023-02-20T19:03:58Z")

</div>

Hi, I am running a neural network with Flux, Zygote, and Optimization libraries. The code is rather long and I have not created a MWE yet (which could take quite a while). The code ran about 800 iterations without troub…

---

## [One-element vector (w/o allocations)](https://discourse.julialang.org/t/one-element-vector-w-o-allocations/94922)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [February 20, 2023, 6:36pm UTC](https://discourse.julialang.org/t/one-element-vector-w-o-allocations/94922 "2023-02-20T18:36:12Z")

</div>

Is there a package for a non-allocating representation of a single-element vector? I am basically thinking of the equivalent of struct OneElementVector{T} \<: AbstractVector{T} x::T end Base.size(v::OneElementVector…

---

## [Include files not showing function docstrings in VScode](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885)

<div class="topic-metadata">

**Author:** [@Droolia](https://discourse.julialang.org/u/Droolia)\
**Replies:** 5\
**Last updated:** [February 20, 2023, 5:53pm UTC](https://discourse.julialang.org/t/include-files-not-showing-function-docstrings-in-vscode/94885 "2023-02-20T17:53:55Z")

</div>

My goal is include the structs, functions, etc. of another .jl file into the new.jl. I have been using the include(“foo.jl”), it works but it doesn’t feel right. For example, my function docstrings do not appear in new.…

---

## [ODEInterfaceDiff - odex() MaximumExtrapolationColumn](https://discourse.julialang.org/t/odeinterfacediff-odex-maximumextrapolationcolumn/94915)

<div class="topic-metadata">

**Author:** [@Gabriel\_Carita](https://discourse.julialang.org/u/Gabriel_Carita)\
**Replies:** 1\
**Last updated:** [February 20, 2023, 5:53pm UTC](https://discourse.julialang.org/t/odeinterfacediff-odex-maximumextrapolationcolumn/94915 "2023-02-20T17:53:38Z")

</div>

Hello, I would like to know if there is an easy way to change the MaximumExtrapolationColumn number in the odex() algorithm I’ve been looking for but I can’t find it.

---

## [Would it be interesting to optimize print(io, xs...) to be type stable?](https://discourse.julialang.org/t/would-it-be-interesting-to-optimize-print-io-xs-to-be-type-stable/94816)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 2\
**Last updated:** [February 20, 2023, 4:22pm UTC](https://discourse.julialang.org/t/would-it-be-interesting-to-optimize-print-io-xs-to-be-type-stable/94816 "2023-02-20T16:22:02Z")

</div>

I noticed that the varargs version of print/println is not type stable and it affects the performance. Some test code below. It’s interesting that map, foreach, and fold are implemented in a type stable way, so… println …

---

## [Triu and tril on Matrix](https://discourse.julialang.org/t/triu-and-tril-on-matrix/94917)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 1\
**Last updated:** [February 20, 2023, 4:15pm UTC](https://discourse.julialang.org/t/triu-and-tril-on-matrix/94917 "2023-02-20T16:15:39Z")

</div>

The current codes are # dense.jl triu(M::Matrix, k::Integer) = triu!(copy(M), k) tril(M::Matrix, k::Integer) = tril!(copy(M), k) # generic.jl triu(M::AbstractMatrix,k::Integer) = triu!(copy(M),k) tril(M::AbstractMatrix…

---

## [Alternatives to Dictionaries in Julia](https://discourse.julialang.org/t/alternatives-to-dictionaries-in-julia/94901)

<div class="topic-metadata">

**Author:** [@ivoytov](https://discourse.julialang.org/u/ivoytov)\
**Replies:** 10\
**Last updated:** [February 20, 2023, 3:59pm UTC](https://discourse.julialang.org/t/alternatives-to-dictionaries-in-julia/94901 "2023-02-20T15:59:53Z")

</div>

I’ve been slowly porting my Java and Python code to Julia and frequently come across statements like “dictionaries are less commonly used in Julia” 1 I catch myself using dictionaries all the time in Julia, as direct re…

---

## [Why are (topic deleted by author) messages shown?](https://discourse.julialang.org/t/why-are-topic-deleted-by-author-messages-shown/94913)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 3:54pm UTC](https://discourse.julialang.org/t/why-are-topic-deleted-by-author-messages-shown/94913 "2023-02-20T15:54:33Z")

</div>

Why are deleted topics shown on the front page? Why are they shown at all?

---

## [Slow Dict comprehension](https://discourse.julialang.org/t/slow-dict-comprehension/94797)

<div class="topic-metadata">

**Author:** [@bbejanov](https://discourse.julialang.org/u/bbejanov)\
**Replies:** 5\
**Last updated:** [February 20, 2023, 3:48pm UTC](https://discourse.julialang.org/t/slow-dict-comprehension/94797 "2023-02-20T15:48:13Z")

</div>

If I construct a Dict using a comprehension I get orders of magnitude slower speed, compared to starting with an empty Dict and running an equivalent loop to fill it in. I’m surprised, because I expected both ways to be …

---

## [Replacement for keys(Pkg.installed()) with Pkg.dependencies()](https://discourse.julialang.org/t/replacement-for-keys-pkg-installed-with-pkg-dependencies/94842)

<div class="topic-metadata">

**Author:** [@austin-putz](https://discourse.julialang.org/u/austin-putz)\
**Replies:** 16\
**Last updated:** [February 20, 2023, 1:57pm UTC](https://discourse.julialang.org/t/replacement-for-keys-pkg-installed-with-pkg-dependencies/94842 "2023-02-20T13:57:43Z")

</div>

I use the current code to pull out installed packages. I want people to just download code for a class, but I’d like to install packages for them. However, Pkg.installed() is deprecated and I cannot figure out how to get…

---

## [Allocations in a convoluted setting](https://discourse.julialang.org/t/allocations-in-a-convoluted-setting/94905)

<div class="topic-metadata">

**Author:** [@maltesie](https://discourse.julialang.org/u/maltesie)\
**Replies:** 6\
**Last updated:** [February 20, 2023, 10:51am UTC](https://discourse.julialang.org/t/allocations-in-a-convoluted-setting/94905 "2023-02-20T10:51:01Z")

</div>

Hi all, I stumbled upon a combination of factors that lead julia to allocate memory where I dont think it should. I guess its an odd case and maybe this has a reason. If so, I would be happy if someone could explain it …

---

## [How to Plot Line Graph from CSV Row Data](https://discourse.julialang.org/t/how-to-plot-line-graph-from-csv-row-data/94875)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 10:44am UTC](https://discourse.julialang.org/t/how-to-plot-line-graph-from-csv-row-data/94875 "2023-02-20T10:44:31Z")

</div>

Hi all, I have this CSV: I want to plot a line graph, with x-tick is the year “2018 2019 2020 2021” From Revenue till Total Equity. So there will be 5 different lines inside one plot. For the y-tick can it be ma…

---

## [Can Julia Create Synastry Table (Astrology Compatibility Calculator)?](https://discourse.julialang.org/t/can-julia-create-synastry-table-astrology-compatibility-calculator/94867)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 11\
**Last updated:** [February 20, 2023, 10:43am UTC](https://discourse.julialang.org/t/can-julia-create-synastry-table-astrology-compatibility-calculator/94867 "2023-02-20T10:43:21Z")

</div>

Hi all, I am learning astro.com that can create Synastry, a Synastry is a comparison of natal chart between two people to measure the compatibility, ever wonder why attracted to someone really high? given that person fa…

---

## [Would it be possible to infer \`Val{::Bool)\` as \`Union{Val{true}, Val{false}}\`?](https://discourse.julialang.org/t/would-it-be-possible-to-infer-val-bool-as-union-val-true-val-false/94728)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 8:25am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-infer-val-bool-as-union-val-true-val-false/94728 "2023-02-20T08:25:05Z")

</div>

Consider the function julia\> f(x::Bool) = Val(x) f (generic function with 1 method) julia\> @code\_typed f(true) CodeInfo( 1 ─ %1 = Core.apply\_type(Base.Val, x)::Type{Val{\_A}} where \_A │ %2 = %new(%1)::Val └── ret…

---

## [JuliaRegistrator stuck on "temporarily deployed to stopwatch"](https://discourse.julialang.org/t/juliaregistrator-stuck-on-temporarily-deployed-to-stopwatch/94903)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 9:27am UTC](https://discourse.julialang.org/t/juliaregistrator-stuck-on-temporarily-deployed-to-stopwatch/94903 "2023-02-20T09:27:34Z")

</div>

I’ve been trying to register a new version of a package, and it seems I have made a hash of it, with a few attempts over the last months. The process appear to me to go ok, but stops with a message that the JuliaRegistra…

---

## [Optimization.jl and constraints](https://discourse.julialang.org/t/optimization-jl-and-constraints/94519)

<div class="topic-metadata">

**Author:** [@ChauhanT](https://discourse.julialang.org/u/ChauhanT)\
**Replies:** 19\
**Last updated:** [February 20, 2023, 9:24am UTC](https://discourse.julialang.org/t/optimization-jl-and-constraints/94519 "2023-02-20T09:24:50Z")

</div>

Hi, I have an optimisation problem which I solve with Optimization.jl using IPNewton(). In order to reduce the space of solutions to a more physically reasonable set, I want to introduce some constraints. I do this usin…

---

## [Warntype\_last() outputs red ::Ref{Float64}](https://discourse.julialang.org/t/warntype-last-outputs-red-ref-float64/94900)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 4\
**Last updated:** [February 20, 2023, 8:13am UTC](https://discourse.julialang.org/t/warntype-last-outputs-red-ref-float64/94900 "2023-02-20T08:13:48Z")

</div>

Unfortunately, I have not managed to create an MVE, but I think I can ask a good question: I use a Ref to make a Float64 mutable within a struct. Using a mutable struct arguably makes more sense, and resolves my issue,…

---

## [JuliaDB doesn't install](https://discourse.julialang.org/t/juliadb-doesnt-install/94808)

<div class="topic-metadata">

**Author:** [@vsoler](https://discourse.julialang.org/u/vsoler)\
**Replies:** 7\
**Last updated:** [February 20, 2023, 7:47am UTC](https://discourse.julialang.org/t/juliadb-doesnt-install/94808 "2023-02-20T07:47:46Z")

</div>

I am trying to install JuliaDB on my PC but I get an error. The problem is that it detects the presence of the package PooledArrays, which is somehow incompatible. I installed PooledArrays some time ago, but I removed …

---

## [What does lp and crank refer to in the prediction](https://discourse.julialang.org/t/what-does-lp-and-crank-refer-to-in-the-prediction/94233)

<div class="topic-metadata">

**Author:** [@Nobel\_Chowdary](https://discourse.julialang.org/u/Nobel_Chowdary)\
**Replies:** 1\
**Last updated:** [February 20, 2023, 6:59am UTC](https://discourse.julialang.org/t/what-does-lp-and-crank-refer-to-in-the-prediction/94233 "2023-02-20T06:59:44Z")

</div>

---

## [Return value of findmin/findmax](https://discourse.julialang.org/t/return-value-of-findmin-findmax/94567)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 15\
**Last updated:** [February 20, 2023, 5:42am UTC](https://discourse.julialang.org/t/return-value-of-findmin-findmax/94567 "2023-02-20T05:42:58Z")

</div>

I would love if functions like findmin and findmax used a named tuple for their return value, because I can never remember which element of the return value is which (and code like findmax(arr)\[2\] has high mental load as…

---

## [Strange error when calling a c function using ccall](https://discourse.julialang.org/t/strange-error-when-calling-a-c-function-using-ccall/94840)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 11\
**Last updated:** [February 20, 2023, 3:50am UTC](https://discourse.julialang.org/t/strange-error-when-calling-a-c-function-using-ccall/94840 "2023-02-20T03:50:16Z")

</div>

I need to use code in c++, for which I made a c-style function and use ccall. I also have tried CxxWrap. In both cases, I sometimes got the following lengthy message when calling the c function. free(): invalid pointer …

---

## [How to re-use threads?](https://discourse.julialang.org/t/how-to-re-use-threads/94731)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 19\
**Last updated:** [February 20, 2023, 3:23am UTC](https://discourse.julialang.org/t/how-to-re-use-threads/94731 "2023-02-20T03:23:04Z")

</div>

I have the below simple MWE for learning purposes on how to synchronize between Threads.@spawn processes accessing a SharedArray. I expect the results to be as below, however, it stuck before going to the following itera…

---

## [Union() - Remove duplicates for multi-dimensional array](https://discourse.julialang.org/t/union-remove-duplicates-for-multi-dimensional-array/94894)

<div class="topic-metadata">

**Author:** [@Students](https://discourse.julialang.org/u/Students)\
**Replies:** 0\
**Last updated:** [February 20, 2023, 3:01am UTC](https://discourse.julialang.org/t/union-remove-duplicates-for-multi-dimensional-array/94894 "2023-02-20T03:01:08Z")

</div>

Hello, Could you please help me to extend the union() for a multidimensional array? Remove duplicate if all the cols match. Eg : \[\[0.0, 0.0, 150.0, 300.0, 350.0\], \[1040.0, 1040.0, 1040.0, 1040.0, 1020.0\]\] —\> \[\[0.0, 150…

---

## [Arpack is broken?](https://discourse.julialang.org/t/arpack-is-broken/94758)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 3\
**Last updated:** [February 19, 2023, 7:29pm UTC](https://discourse.julialang.org/t/arpack-is-broken/94758 "2023-02-19T19:29:35Z")

</div>

Hi all. sorry to bother you guys. I wrote a code a couple of years back that used Arpack in julia. I am updating it but I can´t run it. In my notes for it I have this: Arpacy\_jll must be the newer version. The older …

---

## [Tools to help me learn a big codebase](https://discourse.julialang.org/t/tools-to-help-me-learn-a-big-codebase/94855)

<div class="topic-metadata">

**Author:** [@kingoslo](https://discourse.julialang.org/u/kingoslo)\
**Replies:** 4\
**Last updated:** [February 20, 2023, 2:31am UTC](https://discourse.julialang.org/t/tools-to-help-me-learn-a-big-codebase/94855 "2023-02-20T02:31:51Z")

</div>

This questions is about tools that will enable me to learn a big code base. I have always worked on my own and without any collaborators. It has meant that I’ve never had to learn the source of a code base written by so…

---

## [Efficiency of MOI.CountBelongs](https://discourse.julialang.org/t/efficiency-of-moi-countbelongs/94819)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 1:03am UTC](https://discourse.julialang.org/t/efficiency-of-moi-countbelongs/94819 "2023-02-20T01:03:54Z")

</div>

In the JuMP code below, I want to count the number of occurrences of each possible integer in the variable matrix M. s is defined to be a Kx1 variable vector equal to M\[:\]. Is there any difference in efficiency between @…

---

## [Vector of functions](https://discourse.julialang.org/t/vector-of-functions/94811)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 5\
**Last updated:** [February 19, 2023, 11:54pm UTC](https://discourse.julialang.org/t/vector-of-functions/94811 "2023-02-19T23:54:36Z")

</div>

I am trying to encode a Vector of functions. I wrote the following: # Does not work if I replace function by AbstractFunction a = Vector{Function}(undef, 5) for i in 1:5 a\[i\](t) = cos(i\*t) end I get the error: ER…

---

## [Julia, detecting errors at compile time](https://discourse.julialang.org/t/julia-detecting-errors-at-compile-time/94762)

<div class="topic-metadata">

**Author:** [@zeroexcuses](https://discourse.julialang.org/u/zeroexcuses)\
**Replies:** 6\
**Last updated:** [February 19, 2023, 11:52pm UTC](https://discourse.julialang.org/t/julia-detecting-errors-at-compile-time/94762 "2023-02-19T23:52:40Z")

</div>

Setting aside Julia’s JIT runtime (even Java has a JIT, but javac, which does \*.java → jvm bytecode catches lots of errors): What is the most advanced tool for catching “no method/impl found for dispatch” errors “ahead …

---

## [Deploy pages from branches](https://discourse.julialang.org/t/deploy-pages-from-branches/94274)

<div class="topic-metadata">

**Author:** [@Rex\_Wang](https://discourse.julialang.org/u/Rex_Wang)\
**Replies:** 1\
**Last updated:** [February 19, 2023, 11:16pm UTC](https://discourse.julialang.org/t/deploy-pages-from-branches/94274 "2023-02-19T23:16:08Z")

</div>

When translating the docs of a repo, it is natural to write codes in different branch. Documenter.jl provides two ways to deploy docs from different sources: Hosting Documentation · Documenter.jl Deploy by version num…

---

## [Slicing a sparse variable created from list of tuples](https://discourse.julialang.org/t/slicing-a-sparse-variable-created-from-list-of-tuples/94853)

<div class="topic-metadata">

**Author:** [@felipecordera](https://discourse.julialang.org/u/felipecordera)\
**Replies:** 1\
**Last updated:** [February 19, 2023, 9:16pm UTC](https://discourse.julialang.org/t/slicing-a-sparse-variable-created-from-list-of-tuples/94853 "2023-02-19T21:16:20Z")

</div>

Hi everyone, I would like to do slicing on a sparse variable created from a list of tuples. In the next example (extracted from documentation), the same variable is created in two different ways. While it is possible t…

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

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