# Latest

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

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

**Page:** 547

---

## [Weird UndefRefError in pmap since 1.8](https://discourse.julialang.org/t/weird-undefreferror-in-pmap-since-1-8/91567)

<div class="topic-metadata">

**Author:** [@K\_B](https://discourse.julialang.org/u/K_B)\
**Replies:** 5\
**Last updated:** [November 25, 2023, 4:16am UTC](https://discourse.julialang.org/t/weird-undefreferror-in-pmap-since-1-8/91567 "2023-11-25T04:16:49Z")

</div>

Hey. I am kind of new to the language and my coding knowledge is very minimal. Therefore I am unable to solve (even understand) the problem I have right now. My code is kind of large and convoluted and I don’t know how …

---

## [Make \`only\` use \`first\` for dictionaries (or other types)?](https://discourse.julialang.org/t/make-only-use-first-for-dictionaries-or-other-types/106606)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 15\
**Last updated:** [November 25, 2023, 3:24am UTC](https://discourse.julialang.org/t/make-only-use-first-for-dictionaries-or-other-types/106606 "2023-11-25T03:24:02Z")

</div>

I’ve noticed that only is not as fast as it could be. I compare it to function only2(x) length(x) == 1 || error("Collection must contain exactly one element") @inbounds first(x) # EDIT: added @inbounds end In…

---

## [Time to find the first feasible integer solution with JuMP](https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693)

<div class="topic-metadata">

**Author:** [@baprata](https://discourse.julialang.org/u/baprata)\
**Replies:** 2\
**Last updated:** [November 24, 2023, 11:05pm UTC](https://discourse.julialang.org/t/time-to-find-the-first-feasible-integer-solution-with-jump/106693 "2023-11-24T23:05:10Z")

</div>

I am solving a mixed-integer linear programming model with JuMP and CPLEX. How could I measure the time required to find the first feasible integer solution? Best regards, Bruno

---

## [Materials about AbstractInterpreter](https://discourse.julialang.org/t/materials-about-abstractinterpreter/106442)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 7\
**Last updated:** [November 24, 2023, 8:55pm UTC](https://discourse.julialang.org/t/materials-about-abstractinterpreter/106442 "2023-11-24T20:55:28Z")

</div>

Hi All, one more question emerged from the discussion with Keno, that all the hard work with modification of IRCode and manual typing is useless, since the only nice way to seamlessly put the modified IRCode to compilat…

---

## [Error when file is not found](https://discourse.julialang.org/t/error-when-file-is-not-found/106665)

<div class="topic-metadata">

**Author:** [@Barvid](https://discourse.julialang.org/u/Barvid)\
**Replies:** 12\
**Last updated:** [November 24, 2023, 8:21pm UTC](https://discourse.julialang.org/t/error-when-file-is-not-found/106665 "2023-11-24T20:21:30Z")

</div>

Hello All I am sure there is super simple elegant solution to this, but I cant find it, so sorry for the silly question. my code loads a csv file and sometimes the file is not there, so need to handle that. I found 2 w…

---

## [Is this string2range function correct?](https://discourse.julialang.org/t/is-this-string2range-function-correct/106655)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [November 24, 2023, 6:18pm UTC](https://discourse.julialang.org/t/is-this-string2range-function-correct/106655 "2023-11-24T18:18:28Z")

</div>

I wrote the following function: function string2range(string\_range) a, b, c = split(string\_range, ':') a1 = parse(Float64, a) b1 = parse(Float64, b) c1 = parse(Float64, c) StepRangeLen(a1, b1, 1+Int6…

---

## [Limit \`catch\_backtrace()\` to function handling the exception](https://discourse.julialang.org/t/limit-catch-backtrace-to-function-handling-the-exception/106649)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 2\
**Last updated:** [November 24, 2023, 7:02pm UTC](https://discourse.julialang.org/t/limit-catch-backtrace-to-function-handling-the-exception/106649 "2023-11-24T19:02:58Z")

</div>

Consider the following example: f(x) = 1/sqrt(x) function myfunc(x) try @show f(x) catch exc @error "Exception in f" exception=(exc, catch\_backtrace()) end end myfunc(-1) If I run this in …

---

## [Julia package test failing in github](https://discourse.julialang.org/t/julia-package-test-failing-in-github/106691)

<div class="topic-metadata">

**Author:** [@Kazi\_Abu\_Rousan](https://discourse.julialang.org/u/Kazi_Abu_Rousan)\
**Replies:** 9\
**Last updated:** [November 24, 2023, 6:53pm UTC](https://discourse.julialang.org/t/julia-package-test-failing-in-github/106691 "2023-11-24T18:53:38Z")

</div>

Hello!.. I was watching Chris Rackauckas’s video on how to create package in julia. I was following the steps but it seems like the test in github is failing. Can someone guide me through? Error message is: \[ Info: Co…

---

## [Building an anonymous callback function on the fly](https://discourse.julialang.org/t/building-an-anonymous-callback-function-on-the-fly/106678)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 3\
**Last updated:** [November 24, 2023, 6:28pm UTC](https://discourse.julialang.org/t/building-an-anonymous-callback-function-on-the-fly/106678 "2023-11-24T18:28:35Z")

</div>

Hi. This (I think) is probably a question about meta-programming. I’m writing a System Dynamics (Stock and Flow) wrapper around the DynamicalSystems package. In a method named build!(), I pull together the various bits o…

---

## [Doubt in the 7 - Gridap Darcy Equation Tutorial](https://discourse.julialang.org/t/doubt-in-the-7-gridap-darcy-equation-tutorial/106673)

<div class="topic-metadata">

**Author:** [@pablorubial](https://discourse.julialang.org/u/pablorubial)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 6:10pm UTC](https://discourse.julialang.org/t/doubt-in-the-7-gridap-darcy-equation-tutorial/106673 "2023-11-24T18:10:59Z")

</div>

Hi everyone, I’m new on Julia and I have two doubts about how Julian works: In this tutorial a function is defined to define differents properties in different parts of the domain: function σ(x,u) if ((abs(x\[1\]-0.5) \<…

---

## [How to Determine Acceptance Rate in Turing.jl with Metropolis-Hastings Algorithm](https://discourse.julialang.org/t/how-to-determine-acceptance-rate-in-turing-jl-with-metropolis-hastings-algorithm/106689)

<div class="topic-metadata">

**Author:** [@Can\_Bozdogan](https://discourse.julialang.org/u/Can_Bozdogan)\
**Replies:** 0\
**Last updated:** [November 24, 2023, 5:31pm UTC](https://discourse.julialang.org/t/how-to-determine-acceptance-rate-in-turing-jl-with-metropolis-hastings-algorithm/106689 "2023-11-24T17:31:29Z")

</div>

I am working on a project with Turing.jl using the Metropolis-Hastings (MH) algorithm. I’m interested in tracking the acceptance rate of the sampler in real-time and obtaining the final acceptance rate after the inferenc…

---

## [Accelerating linear algebra code and getting different results](https://discourse.julialang.org/t/accelerating-linear-algebra-code-and-getting-different-results/106634)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 5\
**Last updated:** [November 24, 2023, 3:58pm UTC](https://discourse.julialang.org/t/accelerating-linear-algebra-code-and-getting-different-results/106634 "2023-11-24T15:58:55Z")

</div>

Hello, so, I have been trying accelerating this function called overlap by using broadcasting and dot notation instead of unpacking matrices elements using for loops. However, I am getting different results when I do tha…

---

## [Solving coupled ODE systems](https://discourse.julialang.org/t/solving-coupled-ode-systems/106685)

<div class="topic-metadata">

**Author:** [@JunmingDuan](https://discourse.julialang.org/u/JunmingDuan)\
**Replies:** 2\
**Last updated:** [November 24, 2023, 5:24pm UTC](https://discourse.julialang.org/t/solving-coupled-ode-systems/106685 "2023-11-24T17:24:26Z")

</div>

I would like to solve two coupled ode systems. The first is integrated by any method as usual, while the second is integrated once every 10 steps and its solution is used to modify the parameters (also the rhs) in the fi…

---

## [Documentation needs to be more discoverable and explorable](https://discourse.julialang.org/t/documentation-needs-to-be-more-discoverable-and-explorable/106549)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 24\
**Last updated:** [November 24, 2023, 4:27pm UTC](https://discourse.julialang.org/t/documentation-needs-to-be-more-discoverable-and-explorable/106549 "2023-11-24T16:27:56Z")

</div>

I think that Julia documentation needs to be more “discoverable” or at least “explorable”. I would like to have a local, searchable set of documentation that you could install for the local Julia covering all install…

---

## [Taking Quaternions Seriously](https://discourse.julialang.org/t/taking-quaternions-seriously/44834)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 69\
**Last updated:** [November 24, 2023, 4:00pm UTC](https://discourse.julialang.org/t/taking-quaternions-seriously/44834 "2023-11-24T16:00:16Z")

</div>

There are at least 4 separate implementations of quaternions in Julia. Some of them are \<:AbstractVector, some are \<:AbstractMatrix (:neutral\_face:), some are \<:Number, some follow sijk convention, some follow ijks conv…

---

## [Downloads.download (in PlotlyLight) failing for github plotly.js repository](https://discourse.julialang.org/t/downloads-download-in-plotlylight-failing-for-github-plotly-js-repository/106226)

<div class="topic-metadata">

**Author:** [@Titas22](https://discourse.julialang.org/u/Titas22)\
**Replies:** 6\
**Last updated:** [November 24, 2023, 3:42pm UTC](https://discourse.julialang.org/t/downloads-download-in-plotlylight-failing-for-github-plotly-js-repository/106226 "2023-11-24T15:42:50Z")

</div>

Hi, I’m having issues with using PlotlyLight.jl and tracked down the issue to the following call: Downloads.download("https://github.com/plotly/plotly.js/releases/latest") I end up getting the following error: julia\>…

---

## [Change Activation Function in ELM.jl (Extreme Learning Machines)?](https://discourse.julialang.org/t/change-activation-function-in-elm-jl-extreme-learning-machines/46557)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 10\
**Last updated:** [November 24, 2023, 11:50am UTC](https://discourse.julialang.org/t/change-activation-function-in-elm-jl-extreme-learning-machines/46557 "2023-11-24T11:50:32Z")

</div>

Hi. The ELM.jl implementation of Extreme Machine Learning looks fun and the single example given on Github looks simple enough. Is there any other documentation on how to use activation functions other than sigmoid, or …

---

## [Using inequalities in a polynomial system in Groebner.jl](https://discourse.julialang.org/t/using-inequalities-in-a-polynomial-system-in-groebner-jl/106651)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [November 24, 2023, 11:19am UTC](https://discourse.julialang.org/t/using-inequalities-in-a-polynomial-system-in-groebner-jl/106651 "2023-11-24T11:19:39Z")

</div>

Groebner.jl is useful for solving a system of polynomial equations. This is about a method of transforming an inequality into an equation, so it could be used with Groebner.jl. Suppose, for example, I have this simple e…

---

## [Understanding allocations - function returned by function](https://discourse.julialang.org/t/understanding-allocations-function-returned-by-function/106661)

<div class="topic-metadata">

**Author:** [@ysfoo](https://discourse.julialang.org/u/ysfoo)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 6:50am UTC](https://discourse.julialang.org/t/understanding-allocations-function-returned-by-function/106661 "2023-11-24T06:50:59Z")

</div>

I’m trying to understand why executing a function that has been created by a function causes extra allocations. Example: # 2 allocations function make\_func() function my\_func(x) val = 1.23 return val + x end retu…

---

## [Failure to Precompile Plots](https://discourse.julialang.org/t/failure-to-precompile-plots/106563)

<div class="topic-metadata">

**Author:** [@AlexanderNenninger](https://discourse.julialang.org/u/AlexanderNenninger)\
**Replies:** 11\
**Last updated:** [November 24, 2023, 10:30am UTC](https://discourse.julialang.org/t/failure-to-precompile-plots/106563 "2023-11-24T10:30:09Z")

</div>

Somehow my Plots installation is broken and I can’t figure out what’s going on. Plots compiles fine in my base environment, but if I switch to my project environment, it fails to precompile with the stack trace using Pl…

---

## [JET \`report\_call\` error on array.jl for \`iterate(::DataType)\` using \`typeof\`](https://discourse.julialang.org/t/jet-report-call-error-on-array-jl-for-iterate-datatype-using-typeof/106670)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 0\
**Last updated:** [November 24, 2023, 9:55am UTC](https://discourse.julialang.org/t/jet-report-call-error-on-array-jl-for-iterate-datatype-using-typeof/106670 "2023-11-24T09:55:57Z")

</div>

I define the following function, which seems pretty robust to me myf(vs::Vector{N}) where {N\<:Number} = \[typeof(v) for v in vs\] But, using JET, I get a possible error julia\> JET.report\_call(myf) ═════ 1 possible erro…

---

## [Copying mutable structs without using deepcopy()](https://discourse.julialang.org/t/copying-mutable-structs-without-using-deepcopy/106648)

<div class="topic-metadata">

**Author:** [@rolim.gustavo](https://discourse.julialang.org/u/rolim.gustavo)\
**Replies:** 4\
**Last updated:** [November 24, 2023, 8:37am UTC](https://discourse.julialang.org/t/copying-mutable-structs-without-using-deepcopy/106648 "2023-11-24T08:37:30Z")

</div>

Dear colleagues, I am working on an optimization problem where I have to group a permutation of jobs, which have some characteristics. A solution to this problem can be easily represented as a vector of vectors of a typ…

---

## [\[ANN\] Makie v0.20](https://discourse.julialang.org/t/ann-makie-v0-20/106569)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 25\
**Last updated:** [November 24, 2023, 8:24am UTC](https://discourse.julialang.org/t/ann-makie-v0-20/106569 "2023-11-24T08:24:09Z")

</div>

The latest Makie version has been in the works for about a year, and now it’s finally here. It includes many new features, bug fixes and internal improvements, such as high-DPI support for GLMakie and WGLMakie, faster ti…

---

## [How to force a predicted Flux model to give output numbers \> 0](https://discourse.julialang.org/t/how-to-force-a-predicted-flux-model-to-give-output-numbers-0/106623)

<div class="topic-metadata">

**Author:** [@EL-Bakkali-Jaafar](https://discourse.julialang.org/u/EL-Bakkali-Jaafar)\
**Replies:** 2\
**Last updated:** [November 24, 2023, 8:21am UTC](https://discourse.julialang.org/t/how-to-force-a-predicted-flux-model-to-give-output-numbers-0/106623 "2023-11-24T08:21:49Z")

</div>

Hi everybody, I have some inputs and outputs data for training a model using Flux package. These data by nature should be strictly positive.The training phase was done successfully however when I am trying to check it v…

---

## [Automatic documentation of entire package](https://discourse.julialang.org/t/automatic-documentation-of-entire-package/106616)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [November 23, 2023, 8:52am UTC](https://discourse.julialang.org/t/automatic-documentation-of-entire-package/106616 "2023-11-23T08:52:50Z")

</div>

Can Documenter.jl automatically generate documentation for an entire package by collecting all docstrings from all source files, instead of just the functions specified by the user in index.md?

---

## [How to make PrettyPrint print arrays with fewer rows & columns](https://discourse.julialang.org/t/how-to-make-prettyprint-print-arrays-with-fewer-rows-columns/106613)

<div class="topic-metadata">

**Author:** [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)\
**Replies:** 4\
**Last updated:** [November 24, 2023, 1:37am UTC](https://discourse.julialang.org/t/how-to-make-prettyprint-print-arrays-with-fewer-rows-columns/106613 "2023-11-24T01:37:29Z")

</div>

Currently PrettyPrinting.jl prints an array in the REPL like this julia\> pprint(zeros(100,50)) \[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0…

---

## [Parametric Types - am I using correctly](https://discourse.julialang.org/t/parametric-types-am-i-using-correctly/106342)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 5\
**Last updated:** [November 24, 2023, 1:13am UTC](https://discourse.julialang.org/t/parametric-types-am-i-using-correctly/106342 "2023-11-24T01:13:32Z")

</div>

Wanted to check I’m using parametric types as intended. Two examples below comparing parametric types to using @match macro. I think parametric types are better but the macro does isolate the core logic nicely eg. :l…

---

## [Storing a batch of sparse matrices and multiplying them to a vector](https://discourse.julialang.org/t/storing-a-batch-of-sparse-matrices-and-multiplying-them-to-a-vector/106646)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 1:07am UTC](https://discourse.julialang.org/t/storing-a-batch-of-sparse-matrices-and-multiplying-them-to-a-vector/106646 "2023-11-24T01:07:07Z")

</div>

I store N matrices, each of size(n,n), in the array Batchm = zeros(ComplexF64, N,n,n ). Later, I retrieve the individual matrices and multiply to a vector, Batchm(index, :,:)\*v. The matrices are sparse and banded. What’…

---

## [Defining multiple modules in a package](https://discourse.julialang.org/t/defining-multiple-modules-in-a-package/52702)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 19\
**Last updated:** [November 24, 2023, 12:45am UTC](https://discourse.julialang.org/t/defining-multiple-modules-in-a-package/52702 "2023-11-24T00:45:16Z")

</div>

I am developing two packages. Let’s call them “A” and “B”. Package “A” defines several modules, let’s call them “d”, “e”, and “f”. I have activated environment B from Pkg and made package A a dependency. A.jl: module A…

---

## [Inconsistencies in the number of lines in a CSV file](https://discourse.julialang.org/t/inconsistencies-in-the-number-of-lines-in-a-csv-file/106576)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [November 23, 2023, 8:56pm UTC](https://discourse.julialang.org/t/inconsistencies-in-the-number-of-lines-in-a-csv-file/106576 "2023-11-23T20:56:19Z")

</div>

I had some adventures in reading a CSV file created on a windows computer in Julia, and it as left me with some confusion on what counts as a line. In particular, it sees like CSV.jl and readlines have different opinions…

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

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