# Latest

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

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

**Page:** 362

---

## [Why are \`seed!\` and \`default\_rng\` not public?](https://discourse.julialang.org/t/why-are-seed-and-default-rng-not-public/117125)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 1\
**Last updated:** [July 17, 2024, 6:51am UTC](https://discourse.julialang.org/t/why-are-seed-and-default-rng-not-public/117125 "2024-07-17T06:51:29Z")

</div>

julia\> VERSION v"1.11.0-rc1" julia\> using Random julia\> Base.ispublic(Random, :seed!), Base.ispublic(Random, :default\_rng) (false, false) Does this mean that one should avoid using these functions if the code should b…

---

## [How to solve Equations with Variables on Both Sides](https://discourse.julialang.org/t/how-to-solve-equations-with-variables-on-both-sides/117121)

<div class="topic-metadata">

**Author:** [@HamidrezaSafari](https://discourse.julialang.org/u/HamidrezaSafari)\
**Replies:** 1\
**Last updated:** [July 17, 2024, 6:47am UTC](https://discourse.julialang.org/t/how-to-solve-equations-with-variables-on-both-sides/117121 "2024-07-17T06:47:51Z")

</div>

Polynomial equations like x^2-3x = 2 and x^2-3x \> 4

---

## [Multiple fixed effects using FixedEffects.jl](https://discourse.julialang.org/t/multiple-fixed-effects-using-fixedeffects-jl/117113)

<div class="topic-metadata">

**Author:** [@shilong-sun](https://discourse.julialang.org/u/shilong-sun)\
**Replies:** 2\
**Last updated:** [July 17, 2024, 2:16am UTC](https://discourse.julialang.org/t/multiple-fixed-effects-using-fixedeffects-jl/117113 "2024-07-17T02:16:30Z")

</div>

Hi I’m using FixedEffects.jl to residualize matrices with fixed effects. I might be missing something with the syntax, but I couldn’t get the same results using a simple regression approach. Below is the code from the r…

---

## [Export works but not when \`\] add\` package](https://discourse.julialang.org/t/export-works-but-not-when-add-package/117030)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 10\
**Last updated:** [July 17, 2024, 1:16am UTC](https://discourse.julialang.org/t/export-works-but-not-when-add-package/117030 "2024-07-17T01:16:46Z")

</div>

I am on this one for too long and can’t fix it yet :smiling\_face\_with\_tear: :laughing: A MWE is not productible unfortunately file RingStarProblems.jl contains: module RingStarProblems if "JULIA\_REGISTRYCI\_AUTOMER…

---

## [I can't use intake package with PyCall](https://discourse.julialang.org/t/i-cant-use-intake-package-with-pycall/91435)

<div class="topic-metadata">

**Author:** [@Balinus](https://discourse.julialang.org/u/Balinus)\
**Replies:** 8\
**Last updated:** [July 16, 2024, 11:07pm UTC](https://discourse.julialang.org/t/i-cant-use-intake-package-with-pycall/91435 "2024-07-16T23:07:03Z")

</div>

Hello! I have the following code in Python that is working, but I can’t reproduce it with PyCall. # Python code import intake catalog\_url = 'https://raw.githubusercontent.com/hydrocloudservices/catalogs/main/catalogs/ma…

---

## [Lazy constraints are not supported by SCIP.jl while JuMP doesn't mention it](https://discourse.julialang.org/t/lazy-constraints-are-not-supported-by-scip-jl-while-jump-doesnt-mention-it/117110)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 2\
**Last updated:** [July 16, 2024, 10:11pm UTC](https://discourse.julialang.org/t/lazy-constraints-are-not-supported-by-scip-jl-while-jump-doesnt-mention-it/117110 "2024-07-16T22:11:04Z")

</div>

Dear Julia Discourse community, When running my Unit tests to make my package solver-agnostic: import RingStarProblems as RSP using Test @testset "RingStarProblems.jl" begin # Write your tests here. include("a…

---

## [SIMD: Need some help to speed up sampling a code vector](https://discourse.julialang.org/t/simd-need-some-help-to-speed-up-sampling-a-code-vector/117075)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 28\
**Last updated:** [July 16, 2024, 9:44pm UTC](https://discourse.julialang.org/t/simd-need-some-help-to-speed-up-sampling-a-code-vector/117075 "2024-07-16T21:44:15Z")

</div>

This is part of my work to implement a GNSS receiver in real time (see GNSSReceiver.jl). One crucial part is the code generation that functions as a matched filter. The code is binary and can be modeled as code = Int3…

---

## [How to get subtree from symbolic expression? in ModelingToolkit.jl](https://discourse.julialang.org/t/how-to-get-subtree-from-symbolic-expression-in-modelingtoolkit-jl/117070)

<div class="topic-metadata">

**Author:** [@jogama](https://discourse.julialang.org/u/jogama)\
**Replies:** 2\
**Last updated:** [July 16, 2024, 9:42pm UTC](https://discourse.julialang.org/t/how-to-get-subtree-from-symbolic-expression-in-modelingtoolkit-jl/117070 "2024-07-16T21:42:07Z")

</div>

My apologies if this has already been addressed. Let’s say we have using ModelingToolkit @variables t x(t) y(t) z(t) ex = x \* y + z How should I extract the sub-expression x \* y from ex? It’s not clear to me how I’d …

---

## [GMT error message: Failure to open virtual file](https://discourse.julialang.org/t/gmt-error-message-failure-to-open-virtual-file/116843)

<div class="topic-metadata">

**Author:** [@morningglory05](https://discourse.julialang.org/u/morningglory05)\
**Replies:** 4\
**Last updated:** [July 16, 2024, 9:21pm UTC](https://discourse.julialang.org/t/gmt-error-message-failure-to-open-virtual-file/116843 "2024-07-16T21:21:19Z")

</div>

Someone else had this error in 2018 and opened a GMT issue for it: https://github.com/GenericMappingTools/GMT.jl/issues/59 (I’m not sure if it proper precedure to ask for the error to be reopened or to post here.) Thing…

---

## [Using expression must be at top level](https://discourse.julialang.org/t/using-expression-must-be-at-top-level/117088)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 9\
**Last updated:** [July 16, 2024, 8:33pm UTC](https://discourse.julialang.org/t/using-expression-must-be-at-top-level/117088 "2024-07-16T20:33:31Z")

</div>

In order to make my package Solver parametric, I am trying to read the user prompt to determine which solver he wants to use alongside with JuMP mutable struct SolverOptimizer solver::DataType id::Int end funct…

---

## [Parallelization of long- and short running tasks](https://discourse.julialang.org/t/parallelization-of-long-and-short-running-tasks/99936)

<div class="topic-metadata">

**Author:** [@unis](https://discourse.julialang.org/u/unis)\
**Replies:** 8\
**Last updated:** [July 16, 2024, 6:21pm UTC](https://discourse.julialang.org/t/parallelization-of-long-and-short-running-tasks/99936 "2024-07-16T18:21:56Z")

</div>

Assume you have a long-running, “expensive” function, e.g., function longrun() dim = 20000 A = rand(dim,dim)/dim A^256 end which may take a few minutes to complete, and a function that is short-running a…

---

## [Equation constraints not working in NLopt](https://discourse.julialang.org/t/equation-constraints-not-working-in-nlopt/116883)

<div class="topic-metadata">

**Author:** [@dannygold](https://discourse.julialang.org/u/dannygold)\
**Replies:** 5\
**Last updated:** [July 16, 2024, 5:46pm UTC](https://discourse.julialang.org/t/equation-constraints-not-working-in-nlopt/116883 "2024-07-16T17:46:09Z")

</div>

I’m trying to optimize a likelihood function of three parameters (call them a, b, and c) using the NLopt package. Currently, I have the following: opt = Opt(:LN\_COBYLA, length(θ₀)) function c(result::Vector, x::Vector…

---

## [NLsolve, preallocated ForwardDiff Dual](https://discourse.julialang.org/t/nlsolve-preallocated-forwarddiff-dual/13950)

<div class="topic-metadata">

**Author:** [@nhipsman](https://discourse.julialang.org/u/nhipsman)\
**Replies:** 3\
**Last updated:** [July 16, 2024, 5:19pm UTC](https://discourse.julialang.org/t/nlsolve-preallocated-forwarddiff-dual/13950 "2024-07-16T17:19:50Z")

</div>

I’m trying to use NLsolve (using ForwardDiff) to solve a system of equations that produces intermediate output. For performance, I’m trying to preallocate arrays for it to store that intermediate output, but I’m not sur…

---

## [Preserve against garbage collection in LibGit2](https://discourse.julialang.org/t/preserve-against-garbage-collection-in-libgit2/117095)

<div class="topic-metadata">

**Author:** [@emmt](https://discourse.julialang.org/u/emmt)\
**Replies:** 4\
**Last updated:** [July 16, 2024, 5:11pm UTC](https://discourse.julialang.org/t/preserve-against-garbage-collection-in-libgit2/117095 "2024-07-16T17:11:25Z")

</div>

Maybe I am wrong but I have a concern about the implementation of LibGit2 regarding garbage collection. To ilustrate this, please have a look at the code of a simple function such as: function Base.length(blob::GitBlob)…

---

## [Add metadata to categorical array](https://discourse.julialang.org/t/add-metadata-to-categorical-array/116547)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 4\
**Last updated:** [July 16, 2024, 3:41pm UTC](https://discourse.julialang.org/t/add-metadata-to-categorical-array/116547 "2024-07-16T15:41:07Z")

</div>

Dataframes.jl has a nice feature for adding metadata to a table: Metadata · DataFrames.jl (juliadata.org) This is useful because often you want to use shorter variable names when coding but you want to be able to conve…

---

## [Getting help for Julia functions](https://discourse.julialang.org/t/getting-help-for-julia-functions/117086)

<div class="topic-metadata">

**Author:** [@sn248](https://discourse.julialang.org/u/sn248)\
**Replies:** 6\
**Last updated:** [July 16, 2024, 2:04pm UTC](https://discourse.julialang.org/t/getting-help-for-julia-functions/117086 "2024-07-16T14:04:19Z")

</div>

Hi I am a complete noob to the language (first post!) and I am coming from R programming language. I was wondering if there is any R style ‘help’ in the language. For example I am looking to understand more about the pa…

---

## [Second (non-linear) X-Axis](https://discourse.julialang.org/t/second-non-linear-x-axis/117082)

<div class="topic-metadata">

**Author:** [@jprenderg](https://discourse.julialang.org/u/jprenderg)\
**Replies:** 11\
**Last updated:** [July 16, 2024, 1:50pm UTC](https://discourse.julialang.org/t/second-non-linear-x-axis/117082 "2024-07-16T13:50:30Z")

</div>

Hello, Does anyone know how to make a plot with a second x-axis (on the top edge of the plot). I’d like to make values of the second x-axis a user supplied function of values on the primary x-axis. Thanks, Joe

---

## [GRAPE code for Khaneja et al. "Optimal Control of Coupled Spin Dynamics: Design of NMR Pulse Sequences by Gradient Ascent Algorithms"](https://discourse.julialang.org/t/grape-code-for-khaneja-et-al-optimal-control-of-coupled-spin-dynamics-design-of-nmr-pulse-sequences-by-gradient-ascent-algorithms/117085)

<div class="topic-metadata">

**Author:** [@fqguo](https://discourse.julialang.org/u/fqguo)\
**Replies:** 6\
**Last updated:** [July 16, 2024, 1:13pm UTC](https://discourse.julialang.org/t/grape-code-for-khaneja-et-al-optimal-control-of-coupled-spin-dynamics-design-of-nmr-pulse-sequences-by-gradient-ascent-algorithms/117085 "2024-07-16T13:13:55Z")

</div>

I want to write gradient ascent pulse engineering (GRAPE) and I try the simple Hamiltonian H=\\Omega\*|0\\rangle\\langle 1| + \\Omega\*|1\\rangle\\langle 0|. The initial state is |0\\rangle\\langle 0| and the final state is |1\\ran…

---

## [Safely accessing API tokens while automatically updating](https://discourse.julialang.org/t/safely-accessing-api-tokens-while-automatically-updating/117038)

<div class="topic-metadata">

**Author:** [@John\_Finseth](https://discourse.julialang.org/u/John_Finseth)\
**Replies:** 6\
**Last updated:** [July 16, 2024, 11:16am UTC](https://discourse.julialang.org/t/safely-accessing-api-tokens-while-automatically-updating/117038 "2024-07-16T11:16:42Z")

</div>

Hello. I’m working with setting up an API in Julia. It requires tokens, which periodically expire. I currently have my tokens saved in “tokens.json” file, which I read when initializing the code. However, I wanted to cr…

---

## [Activating environment on multiple SGE\_cluster nodes fails](https://discourse.julialang.org/t/activating-environment-on-multiple-sge-cluster-nodes-fails/117092)

<div class="topic-metadata">

**Author:** [@alequa](https://discourse.julialang.org/u/alequa)\
**Replies:** 1\
**Last updated:** [July 16, 2024, 10:01am UTC](https://discourse.julialang.org/t/activating-environment-on-multiple-sge-cluster-nodes-fails/117092 "2024-07-16T10:01:57Z")

</div>

Hello, I have this pipeline to run a simulation on a SGE cluster (see below). Basically I activate the same environment @everywhere and later load packages from the env. The problem is that now Julia fails in activati…

---

## [\[ANN\] TensorOperations v5](https://discourse.julialang.org/t/ann-tensoroperations-v5/117091)

<div class="topic-metadata">

**Author:** [@juthohaegeman](https://discourse.julialang.org/u/juthohaegeman)\
**Replies:** 0\
**Last updated:** [July 16, 2024, 8:35am UTC](https://discourse.julialang.org/t/ann-tensoroperations-v5/117091 "2024-07-16T08:35:11Z")

</div>

Together with @lkdvos , we are pleased to announce v5 of TensorOperations. In this version, we have further improved the AD support and further extended the support for different backends and allocation strategies to de…

---

## [\[ANN-RFC\] FlowsheetTools.jl](https://discourse.julialang.org/t/ann-rfc-flowsheettools-jl/117011)

<div class="topic-metadata">

**Author:** [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Replies:** 2\
**Last updated:** [July 16, 2024, 8:05am UTC](https://discourse.julialang.org/t/ann-rfc-flowsheettools-jl/117011 "2024-07-16T08:05:39Z")

</div>

A request for comments on a new WIP package, FlowsheetTools.jl. This is a basic flowsheeting toolkit for chemical / process engineers. There is always a need for mass balance reconciliation in my job - either when I a…

---

## [Large interpolation error for exponential integrators in DifferentialEquations](https://discourse.julialang.org/t/large-interpolation-error-for-exponential-integrators-in-differentialequations/117047)

<div class="topic-metadata">

**Author:** [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Replies:** 2\
**Last updated:** [July 16, 2024, 7:11am UTC](https://discourse.julialang.org/t/large-interpolation-error-for-exponential-integrators-in-differentialequations/117047 "2024-07-16T07:11:10Z")

</div>

I was recently working with SplitODEProblem using exponential integrators and I noticed a huge error when doing the interpolation of the solution, which I think is wrong. I began to notice this since, by default, the so…

---

## [Suggestion: abstraction for integrated GPUs?](https://discourse.julialang.org/t/suggestion-abstraction-for-integrated-gpus/117061)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 7\
**Last updated:** [July 16, 2024, 7:06am UTC](https://discourse.julialang.org/t/suggestion-abstraction-for-integrated-gpus/117061 "2024-07-16T07:06:16Z")

</div>

I have had the following thought: many people do not have regular access to HPC or high-end GPUs (where Nvidia seems most popular), and/or prioritize the benefit of interactive sessions on their personal laptops and low …

---

## [Error in building run time function by Lux.jl model with other equations](https://discourse.julialang.org/t/error-in-building-run-time-function-by-lux-jl-model-with-other-equations/116615)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 4\
**Last updated:** [July 16, 2024, 1:50am UTC](https://discourse.julialang.org/t/error-in-building-run-time-function-by-lux-jl-model-with-other-equations/116615 "2024-07-16T01:50:37Z")

</div>

I want to build an Equation using a neural network (based on Lux.jl) as follows: using Lux using LuxCore using Symbolics using StableRNGs using ModelingToolkit using ModelingToolkitNeuralNets using ModelingToolkit:t\_nou…

---

## [How to run my version of a function from a package](https://discourse.julialang.org/t/how-to-run-my-version-of-a-function-from-a-package/117073)

<div class="topic-metadata">

**Author:** [@sideyt](https://discourse.julialang.org/u/sideyt)\
**Replies:** 2\
**Last updated:** [July 16, 2024, 1:42am UTC](https://discourse.julialang.org/t/how-to-run-my-version-of-a-function-from-a-package/117073 "2024-07-16T01:42:00Z")

</div>

I have translated SAMIN (optimize) in the Optim package to another language (where it is needed) and need to add print statements to the Julia code for comparison. This is the code I wish to run: I have placed samin.jl…

---

## [LoadError: \`llvmcall\` must be compiled to be called when calling Zygote.Jacobian](https://discourse.julialang.org/t/loaderror-llvmcall-must-be-compiled-to-be-called-when-calling-zygote-jacobian/116974)

<div class="topic-metadata">

**Author:** [@Baptiste\_Fabre](https://discourse.julialang.org/u/Baptiste_Fabre)\
**Replies:** 2\
**Last updated:** [July 15, 2024, 9:28pm UTC](https://discourse.julialang.org/t/loaderror-llvmcall-must-be-compiled-to-be-called-when-calling-zygote-jacobian/116974 "2024-07-15T21:28:37Z")

</div>

Dear all, I am facing a problem when trying to use Zygote.Jacobian to train a network. Here is the function that I am using to get the Jacobian of a network function dSCustomNonLinear(model, px::CuArray{T}, py::CuArra…

---

## [\[ANN\] PermutationTests.jl, a package for multiple hypothesis testing](https://discourse.julialang.org/t/ann-permutationtests-jl-a-package-for-multiple-hypothesis-testing/116862)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 5\
**Last updated:** [July 15, 2024, 9:21pm UTC](https://discourse.julialang.org/t/ann-permutationtests-jl-a-package-for-multiple-hypothesis-testing/116862 "2024-07-15T21:21:50Z")

</div>

Hello, i am glad to annonce PermutationTests.jl, a fast, comprehensive and well-documented package for univariate and multiple comparisons hypothesis tests by data permutation. In practice, this is useful when your data…

---

## [\`@nospecialize\` on type parameter](https://discourse.julialang.org/t/nospecialize-on-type-parameter/117071)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 1\
**Last updated:** [July 15, 2024, 8:55pm UTC](https://discourse.julialang.org/t/nospecialize-on-type-parameter/117071 "2024-07-15T20:55:18Z")

</div>

This is mostly out of curiosity: Say that I have a struct with a lot of type parameters. One of those parameters changes each run, and I don’t want to specialize on it. Is there any way I can get something like the follo…

---

## [Distributions.jl: how to create a mixture of a scaled Beta distribution?](https://discourse.julialang.org/t/distributions-jl-how-to-create-a-mixture-of-a-scaled-beta-distribution/117062)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 2\
**Last updated:** [July 15, 2024, 8:20pm UTC](https://discourse.julialang.org/t/distributions-jl-how-to-create-a-mixture-of-a-scaled-beta-distribution/117062 "2024-07-15T20:20:43Z")

</div>

Defining a mixture of 2 Beta distributions works as one would expect: using Distributions, GLMakie LocationScale(0.5, 1, Beta(1, 1)) d = MixtureModel( Beta\[ Beta(1, 1), Beta(2, 10)\], \[0.5, 0.5\]) xa…

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

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