# Latest

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

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

**Page:** 241

---

## [Allowing simultaneous ContinuousCallback to trigger (DifferentialEquations.jl)](https://discourse.julialang.org/t/allowing-simultaneous-continuouscallback-to-trigger-differentialequations-jl/124594)

<div class="topic-metadata">

**Author:** [@lte678](https://discourse.julialang.org/u/lte678)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 3:14pm UTC](https://discourse.julialang.org/t/allowing-simultaneous-continuouscallback-to-trigger-differentialequations-jl/124594 "2025-01-10T15:14:31Z")

</div>

I am working on an application where ContinuousCallbacks are dynamically generated based on a user configuration. Since I have “no control” over these, collisions can and do occur. For example if two of the conditions ha…

---

## [Struct containing a dictionary of cache buffers?](https://discourse.julialang.org/t/struct-containing-a-dictionary-of-cache-buffers/124643)

<div class="topic-metadata">

**Author:** [@cocoa1231](https://discourse.julialang.org/u/cocoa1231)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 2:52pm UTC](https://discourse.julialang.org/t/struct-containing-a-dictionary-of-cache-buffers/124643 "2025-01-10T14:52:45Z")

</div>

I want to have a few buffers and/or dicts that serve as caches for various methods I’m implementing on my struct. This struct will basically be alive for the lifetime of the program as it’s a wrapper containing informati…

---

## [Viewer of matrix in VS Code](https://discourse.julialang.org/t/viewer-of-matrix-in-vs-code/105369)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 6\
**Last updated:** [January 10, 2025, 2:32pm UTC](https://discourse.julialang.org/t/viewer-of-matrix-in-vs-code/105369 "2025-01-10T14:32:28Z")

</div>

Hello! Is there a way to view a multidimensional matrix like in environment spyder? For example, I have a NxNx2 matrix and I would like to present it in a similar form, where each cell would contain two elements

---

## [StaticArrays solve symmetric linear system - seems typeinstable](https://discourse.julialang.org/t/staticarrays-solve-symmetric-linear-system-seems-typeinstable/124634)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [January 10, 2025, 2:25pm UTC](https://discourse.julialang.org/t/staticarrays-solve-symmetric-linear-system-seems-typeinstable/124634 "2025-01-10T14:25:03Z")

</div>

Hi there, I am wondering why the following does not return a SVector, but allocates a normal Vector. Also warntype shows problems using StaticArrays using LinearAlgebra using Statistics function testme(xs=rand(20)) …

---

## [Convolution of Dependent Random Variables with Copula](https://discourse.julialang.org/t/convolution-of-dependent-random-variables-with-copula/124603)

<div class="topic-metadata">

**Author:** [@rand5](https://discourse.julialang.org/u/rand5)\
**Replies:** 3\
**Last updated:** [January 10, 2025, 1:45pm UTC](https://discourse.julialang.org/t/convolution-of-dependent-random-variables-with-copula/124603 "2025-01-10T13:45:05Z")

</div>

I’m running into domain issues when trying to compute the convolution of two random variables where their joint distribution is defined by a copula. By convolution I mean: f\_{Z}(z) = \\int\_{-\\inf}^{\\inf} f\_{XY}(x,z-x)dx…

---

## [Setting inner size of figures generated by Plots.jl nside Pluto notebook](https://discourse.julialang.org/t/setting-inner-size-of-figures-generated-by-plots-jl-nside-pluto-notebook/124635)

<div class="topic-metadata">

**Author:** [@hisacro](https://discourse.julialang.org/u/hisacro)\
**Replies:** 0\
**Last updated:** [January 10, 2025, 11:34am UTC](https://discourse.julialang.org/t/setting-inner-size-of-figures-generated-by-plots-jl-nside-pluto-notebook/124635 "2025-01-10T11:34:39Z")

</div>

Currently I’m code follows as below using Plots; gr(size=(600,600)) begin Plots.plot(\[3,4\],\[10,8\]) Plots.plot!(twinx(),\[.8,.2\],\[.4,-4\]) Plots.plot!(xguidefontsize=20,yguidefontsize=20, tickfontsize=20, fontfamily=…

---

## [\[solved\] Plotting 2 plots on same figure with dual axis](https://discourse.julialang.org/t/solved-plotting-2-plots-on-same-figure-with-dual-axis/124623)

<div class="topic-metadata">

**Author:** [@hisacro](https://discourse.julialang.org/u/hisacro)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 6:55am UTC](https://discourse.julialang.org/t/solved-plotting-2-plots-on-same-figure-with-dual-axis/124623 "2025-01-10T06:55:59Z")

</div>

I wanted to plots 2 data on the same figure with their respective legends one on left, bottom while for the other on top and right. For example, using Plots, plot(\[.4,.3\],\[.8,.3\]) plot!(\[5,3\],\[4,8\]) this is the output…

---

## [Unit test for constant folding success](https://discourse.julialang.org/t/unit-test-for-constant-folding-success/124625)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 6\
**Last updated:** [January 10, 2025, 11:02am UTC](https://discourse.julialang.org/t/unit-test-for-constant-folding-success/124625 "2025-01-10T11:02:52Z")

</div>

Here’s a proposal for how to test for successful constant folding: using Test function test\_constant\_folding(f, r) vec = code\_typed(f, Tuple{}) p = only(vec) code\_info = first(p) code = try code…

---

## [The Unreasonable Efficiency and Effectiveness of Multiple Dispatch: Your Favourite Examples](https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 36\
**Last updated:** [January 10, 2025, 9:38am UTC](https://discourse.julialang.org/t/the-unreasonable-efficiency-and-effectiveness-of-multiple-dispatch-your-favourite-examples/119477 "2025-01-10T09:38:16Z")

</div>

@Datseris asked if there’s a formally citable reference with the points, examples and concepts presented by @StefanKarpinski on The Unreasonable Effectiveness of Multiple Dispatch. In the slack discussion linked above, …

---

## [Looking for programmatic solutions](https://discourse.julialang.org/t/looking-for-programmatic-solutions/124525)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 7\
**Last updated:** [January 10, 2025, 9:01am UTC](https://discourse.julialang.org/t/looking-for-programmatic-solutions/124525 "2025-01-10T09:01:02Z")

</div>

I tried to solve, and in the end I succeeded (I had inserted a solution with extra white spaces so the answer was rejected even if substantially correct and this made me damn in the search for the error that was not in t…

---

## [ApproxFun: Derivative: Set vs. Unset space](https://discourse.julialang.org/t/approxfun-derivative-set-vs-unset-space/124601)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 3\
**Last updated:** [January 10, 2025, 7:30am UTC](https://discourse.julialang.org/t/approxfun-derivative-set-vs-unset-space/124601 "2025-01-10T07:30:45Z")

</div>

Regarding ApproxFun.jl (likely more general): what is the rationale (guideline or rule of thumb) for setting or unsetting the space for the Derivative function?

---

## [\[question\] Finding number of closed potential contours and area enclosed by them](https://discourse.julialang.org/t/question-finding-number-of-closed-potential-contours-and-area-enclosed-by-them/124034)

<div class="topic-metadata">

**Author:** [@hisacro](https://discourse.julialang.org/u/hisacro)\
**Replies:** 16\
**Last updated:** [January 10, 2025, 5:38am UTC](https://discourse.julialang.org/t/question-finding-number-of-closed-potential-contours-and-area-enclosed-by-them/124034 "2025-01-10T05:38:20Z")

</div>

Hello, I’m trying to calculate the number of closed contours in a potential as well the area enclosed by closed, i.e. In this image below at certain energy level there are 4 closed contours. I’m trying to figure a way t…

---

## [Can MLJ \`Stack\` already trained models?](https://discourse.julialang.org/t/can-mlj-stack-already-trained-models/124506)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 5\
**Last updated:** [January 10, 2025, 4:48am UTC](https://discourse.julialang.org/t/can-mlj-stack-already-trained-models/124506 "2025-01-10T04:48:48Z")

</div>

The doc at Model Stacking · MLJ shows how to stack models, but the base models are trained at the same time. Is there a way to use already-trained models and only train the metalearner?

---

## [How to get the vector of vertices and connectivity](https://discourse.julialang.org/t/how-to-get-the-vector-of-vertices-and-connectivity/124563)

<div class="topic-metadata">

**Author:** [@Mizu49](https://discourse.julialang.org/u/Mizu49)\
**Replies:** 3\
**Last updated:** [January 10, 2025, 1:43am UTC](https://discourse.julialang.org/t/how-to-get-the-vector-of-vertices-and-connectivity/124563 "2025-01-10T01:43:53Z")

</div>

How can I obtain the vectors of the vertices and connectivity from the primitive geometry defined by Meshes.jl? julia\> b = Meshes.Box((0.0, 0.0, 0.0), (1.0, 1.0, 1.0)) Box ├─ min: Point(x: 0.0 m, y: 0.0 m, z: 0.0 m) └─…

---

## [How to modify the label details from a \`poly\` object (not just the text)](https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609)

<div class="topic-metadata">

**Author:** [@favba](https://discourse.julialang.org/u/favba)\
**Replies:** 2\
**Last updated:** [January 9, 2025, 9:04pm UTC](https://discourse.julialang.org/t/how-to-modify-the-label-details-from-a-poly-object-not-just-the-text/124609 "2025-01-09T21:04:30Z")

</div>

I’m trying to change the figure below to make the red and green squares in the labels box smaller (and, as a side effect, make the label box smaller, such that it doesn’t overlap with the circles). How can I achieve tha…

---

## [Avoid allocation for local array](https://discourse.julialang.org/t/avoid-allocation-for-local-array/124602)

<div class="topic-metadata">

**Author:** [@ocp](https://discourse.julialang.org/u/ocp)\
**Replies:** 6\
**Last updated:** [January 9, 2025, 8:17pm UTC](https://discourse.julialang.org/t/avoid-allocation-for-local-array/124602 "2025-01-09T20:17:45Z")

</div>

I’m curious if there is a way to have a small, local array without allocations. Here is a short, contrived example: julia\> function foo(x) arr = \[1.0, 2.0, 3.0\] if x \< 1 arr\[1\] \*= x…

---

## [ForwardMethods.jl: Composition made easy(ish) (I'm not the author)](https://discourse.julialang.org/t/forwardmethods-jl-composition-made-easy-ish-im-not-the-author/124454)

<div class="topic-metadata">

**Author:** [@cocoa1231](https://discourse.julialang.org/u/cocoa1231)\
**Replies:** 5\
**Last updated:** [January 9, 2025, 6:45pm UTC](https://discourse.julialang.org/t/forwardmethods-jl-composition-made-easy-ish-im-not-the-author/124454 "2025-01-09T18:45:24Z")

</div>

I’m not the author of this package but I found this really useful in my work just now and I thought it deserves some more love. It allows you to forward a number of methods for your wrapper types in one macro, and even i…

---

## [Using SNOPT in Julia](https://discourse.julialang.org/t/using-snopt-in-julia/124573)

<div class="topic-metadata">

**Author:** [@nico](https://discourse.julialang.org/u/nico)\
**Replies:** 2\
**Last updated:** [January 9, 2025, 6:39pm UTC](https://discourse.julialang.org/t/using-snopt-in-julia/124573 "2025-01-09T18:39:41Z")

</div>

Hi All! I have been trying to set up the optimization package SNOPT in Julia. I tried with SNOW.jl, and SNOPT.jl but I did not succeed to set up the packages and get them to work. I tried in Linux (Ubuntu). Does anyo…

---

## [\[ANN\] Lexbor.jl - HTML parser wrapping the C library lexbor](https://discourse.julialang.org/t/ann-lexbor-jl-html-parser-wrapping-the-c-library-lexbor/124538)

<div class="topic-metadata">

**Author:** [@mike](https://discourse.julialang.org/u/mike)\
**Replies:** 4\
**Last updated:** [January 9, 2025, 5:16pm UTC](https://discourse.julialang.org/t/ann-lexbor-jl-html-parser-wrapping-the-c-library-lexbor/124538 "2025-01-09T17:16:13Z")

</div>

Announcing Lexbor.jl, which provides HTML parsing and DOM queries via CSS selector syntax. Docs can be found at https://michaelhatherly.github.io/Lexbor.jl. This package is mostly just a wrapper around the GitHub - lexb…

---

## [How to incorporate discount factor in an SDDP.jl model?](https://discourse.julialang.org/t/how-to-incorporate-discount-factor-in-an-sddp-jl-model/124598)

<div class="topic-metadata">

**Author:** [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Replies:** 0\
**Last updated:** [January 9, 2025, 4:48pm UTC](https://discourse.julialang.org/t/how-to-incorporate-discount-factor-in-an-sddp-jl-model/124598 "2025-01-09T16:48:35Z")

</div>

I am working on a research paper for which I am using SDDP.jl to solve a multi-stage stochastic optimization problem. In this regard, for sensitivity analysis, I need a discount factor. However, I cannot figure out the w…

---

## [How to adjust the number and format of DateTime ticks using Plots.jl?](https://discourse.julialang.org/t/how-to-adjust-the-number-and-format-of-datetime-ticks-using-plots-jl/101980)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 2\
**Last updated:** [July 24, 2023, 12:07pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-number-and-format-of-datetime-ticks-using-plots-jl/101980 "2023-07-24T12:07:33Z")

</div>

I am trying to plot a time series with Plots.jl. The x axis is in DateTime format, and I want to format the dates and limit the number of ticks. The following reproducible example serves to show what I am trying to acco…

---

## [Julia nightly REPL has broken prompt](https://discourse.julialang.org/t/julia-nightly-repl-has-broken-prompt/124591)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 4\
**Last updated:** [January 9, 2025, 3:13pm UTC](https://discourse.julialang.org/t/julia-nightly-repl-has-broken-prompt/124591 "2025-01-09T15:13:21Z")

</div>

Hi, I just updated my nightly version, but the REPL is unusable (Windows).

---

## [Sequentially add data to a DataFrame](https://discourse.julialang.org/t/sequentially-add-data-to-a-dataframe/12927)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [January 9, 2025, 1:47pm UTC](https://discourse.julialang.org/t/sequentially-add-data-to-a-dataframe/12927 "2025-01-09T13:47:50Z")

</div>

I often need to populate a DataFrame sequentially, one iteration at a time. I therefore end up initiating a DataFrame with mock data but with the correct types, deleting that first row, and then iterating through the rea…

---

## [Error Importing \`OptimalTransport\`: \`UndefVarError: \_iszero\` Not Defined in \`LinearAlgebra\`](https://discourse.julialang.org/t/error-importing-optimaltransport-undefvarerror-iszero-not-defined-in-linearalgebra/124574)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 1\
**Last updated:** [January 9, 2025, 12:49pm UTC](https://discourse.julialang.org/t/error-importing-optimaltransport-undefvarerror-iszero-not-defined-in-linearalgebra/124574 "2025-01-09T12:49:03Z")

</div>

Hello Julia Community, I’m encountering an error when trying to import the OptimalTransport package, and I’m not sure how to resolve it. Below is the error message I receive: Failed to precompile OptimalTransport \[7e02…

---

## [\[ANN\] PeriodicMatrices.jl - Handling of periodic time-varying matrices](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 4\
**Last updated:** [January 7, 2025, 7:24am UTC](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425 "2025-01-07T07:24:03Z")

</div>

PeriodicMatrices.jl provides the basic tools to handle periodic time-varying matrices. This package is the basis for developing the PeriodicMatrixEquations.jl and PeriodicSystems.jl packages. For a real periodic matrix A…

---

## [Numerical accuracy/machine accuracy and roundness in Julia](https://discourse.julialang.org/t/numerical-accuracy-machine-accuracy-and-roundness-in-julia/124541)

<div class="topic-metadata">

**Author:** [@Ofenblech](https://discourse.julialang.org/u/Ofenblech)\
**Replies:** 12\
**Last updated:** [January 9, 2025, 10:26am UTC](https://discourse.julialang.org/t/numerical-accuracy-machine-accuracy-and-roundness-in-julia/124541 "2025-01-09T10:26:50Z")

</div>

Dear community, I am new to the forum and I’m looking for a good option for how I can round Julia’s machine accuracy for polynomials or simplify the numbers in the system. I am concerned with the following problems: I …

---

## [Async UDP socket usage](https://discourse.julialang.org/t/async-udp-socket-usage/124401)

<div class="topic-metadata">

**Author:** [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Replies:** 8\
**Last updated:** [January 9, 2025, 7:55am UTC](https://discourse.julialang.org/t/async-udp-socket-usage/124401 "2025-01-09T07:55:22Z")

</div>

We have a problem with async usage of UDP sockets, so I made a MWE to demonstrate it. We run a simple UDP echo deamon with socat: socat -v PIPE udp-recvfrom:9809,fork This listens on port 9809 and echoes back to the s…

---

## [\[ANN\] LatentClassAnalysis.jl - Latent Class Analysis in Julia](https://discourse.julialang.org/t/ann-latentclassanalysis-jl-latent-class-analysis-in-julia/121814)

<div class="topic-metadata">

**Author:** [@yanwenwang24](https://discourse.julialang.org/u/yanwenwang24)\
**Replies:** 8\
**Last updated:** [January 9, 2025, 7:53am UTC](https://discourse.julialang.org/t/ann-latentclassanalysis-jl-latent-class-analysis-in-julia/121814 "2025-01-09T07:53:57Z")

</div>

Hi all! :waving\_hand:t3:I’m happy to announce LatentClassAnalysis.jl, a package I’ve developed for Latent Class Analysis (LCA). Key Features This package can do: Model specification with dummies or categorical indica…

---

## [Other kinds of tests](https://discourse.julialang.org/t/other-kinds-of-tests/124523)

<div class="topic-metadata">

**Author:** [@phma](https://discourse.julialang.org/u/phma)\
**Replies:** 3\
**Last updated:** [January 9, 2025, 7:19am UTC](https://discourse.julialang.org/t/other-kinds-of-tests/124523 "2025-01-09T07:19:12Z")

</div>

Pass/fail tests go in test/runtests.jl. But there are other kinds of tests. A cryptographer may want to publish his cryptanalysis code, but users of the crypto library shouldn’t have to depend on the packages used in cr…

---

## [Should InexactError be thrown when converting from Int64 to Float64?](https://discourse.julialang.org/t/should-inexacterror-be-thrown-when-converting-from-int64-to-float64/124531)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 4\
**Last updated:** [January 9, 2025, 7:13am UTC](https://discourse.julialang.org/t/should-inexacterror-be-thrown-when-converting-from-int64-to-float64/124531 "2025-01-09T07:13:57Z")

</div>

Converting from Float64 to Int64 works fine if the number is an integer, otherwise a InexactError is thrown, and the user is required to use a function such as round or floor to perform the conversion in general. julia\> …

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

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