# New to Julia

**URL:** https://discourse.julialang.org/c/first-steps/8.md?page=21

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

**Page:** 22

---

## [Where to put export statements (Sub-Module Pattern) in distributed code?](https://discourse.julialang.org/t/where-to-put-export-statements-sub-module-pattern-in-distributed-code/125871)

<div class="topic-metadata">

**Author:** [@gwr](https://discourse.julialang.org/u/gwr)\
**Replies:** 2\
**Last updated:** [February 13, 2025, 7:26pm UTC](https://discourse.julialang.org/t/where-to-put-export-statements-sub-module-pattern-in-distributed-code/125871 "2025-02-13T19:26:42Z")

</div>

I am working through Tom Kwong’s book "Hands-On Design Patterns and Best Practices with Julia." In Chapter 7 on Maintainability Patterns, Tom talks about organizing code (sub-module pattern) and gives an example where a …

---

## [Pvalue for Spearman Correlation in julia](https://discourse.julialang.org/t/pvalue-for-spearman-correlation-in-julia/125824)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [February 13, 2025, 2:02pm UTC](https://discourse.julialang.org/t/pvalue-for-spearman-correlation-in-julia/125824 "2025-02-13T14:02:12Z")

</div>

How to find correlation pvalue in case of spearman method? For Pearson, it’s straightforward with function CorrelationTest() but I couldn’t find something similar for spearman.

---

## [Reset base environment](https://discourse.julialang.org/t/reset-base-environment/125833)

<div class="topic-metadata">

**Author:** [@Donald](https://discourse.julialang.org/u/Donald)\
**Replies:** 3\
**Last updated:** [February 12, 2025, 4:21pm UTC](https://discourse.julialang.org/t/reset-base-environment/125833 "2025-02-12T16:21:53Z")

</div>

I accidentally installed the Example package into my base (@v1.11) Julia environment. Is there a way to reset the environment and remove this package?

---

## [Possible method call error -\> docstring above struct fields](https://discourse.julialang.org/t/possible-method-call-error-docstring-above-struct-fields/125825)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 4\
**Last updated:** [February 12, 2025, 3:23pm UTC](https://discourse.julialang.org/t/possible-method-call-error-docstring-above-struct-fields/125825 "2025-02-12T15:23:47Z")

</div>

In VS Code, I keep getting that the linter returns a “possible method call error” if I try to create an instance of a struct with fields to which I’ve added docstrings; see the below MWE where the linter doesn’t complain…

---

## [Quick check that sum of positive values is at most threshold](https://discourse.julialang.org/t/quick-check-that-sum-of-positive-values-is-at-most-threshold/125828)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 5\
**Last updated:** [February 12, 2025, 3:22pm UTC](https://discourse.julialang.org/t/quick-check-that-sum-of-positive-values-is-at-most-threshold/125828 "2025-02-12T15:22:36Z")

</div>

Hi, in my code, I need to determine whether sum(x) \<= a, where I know that the values x are all positive, so concluding false is in theory possible before we’ve added all values in x together. This led me to wonder if it…

---

## [Simple question about macro arguments](https://discourse.julialang.org/t/simple-question-about-macro-arguments/125795)

<div class="topic-metadata">

**Author:** [@Ludovic\_Dumoulin](https://discourse.julialang.org/u/Ludovic_Dumoulin)\
**Replies:** 6\
**Last updated:** [February 12, 2025, 3:14pm UTC](https://discourse.julialang.org/t/simple-question-about-macro-arguments/125795 "2025-02-12T15:14:18Z")

</div>

Hello, I would like to use a macro to compute derivative of several fields. Concretly, in a simplified context, I have the following issue: for the macro macro testij(i,j) esc(:(a\[$i\]=b\[$j\] )) end for a and b define…

---

## [Problem dowloading Landsat images as RemoteS documentation](https://discourse.julialang.org/t/problem-dowloading-landsat-images-as-remotes-documentation/125772)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 6\
**Last updated:** [February 12, 2025, 1:29pm UTC](https://discourse.julialang.org/t/problem-dowloading-landsat-images-as-remotes-documentation/125772 "2025-02-12T13:29:03Z")

</div>

Hello I created a free Amazon AWS account and I am trying to download the test image of RemoteS doc and I get a HTTP 403 error. I assume the other errors are due to the download failure. using RemoteS, GMT Ir = gmtread…

---

## [Extracting warmup samples in turing.jl](https://discourse.julialang.org/t/extracting-warmup-samples-in-turing-jl/125262)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [February 11, 2025, 1:08pm UTC](https://discourse.julialang.org/t/extracting-warmup-samples-in-turing-jl/125262 "2025-02-11T13:08:50Z")

</div>

Hello, Im running inference for my model in turing.jl. Im using NUTS() sampler where I give some warmup. I was wondering that if I can extract these warmup samples ? rather than getting chain plot with just samples afte…

---

## [How to change dims data from NT or T to ::OutDims for YAXArrays.DAT.OutputCube](https://discourse.julialang.org/t/how-to-change-dims-data-from-nt-or-t-to-outdims-for-yaxarrays-dat-outputcube/125700)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 0\
**Last updated:** [February 9, 2025, 9:17am UTC](https://discourse.julialang.org/t/how-to-change-dims-data-from-nt-or-t-to-outdims-for-yaxarrays-dat-outputcube/125700 "2025-02-09T09:17:41Z")

</div>

Hi guys, I am new to Julia, and wants to run a function which is like: outcubes = mapCube(TEMYax, (incubes...,); selected\_models=selected\_models, forcing\_vars=forcing.variables, output\_v…

---

## [Julia irresponsive with threads=auto and using ImageView](https://discourse.julialang.org/t/julia-irresponsive-with-threads-auto-and-using-imageview/125669)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 5\
**Last updated:** [February 9, 2025, 4:08am UTC](https://discourse.julialang.org/t/julia-irresponsive-with-threads-auto-and-using-imageview/125669 "2025-02-09T04:08:03Z")

</div>

Hello I have noticed that with the switch --threads=auto while starting Julia and using package ImageView the system has trouble responding to keyboard hits. If I try using up, down, left or right arrows on my keyboard …

---

## [New to Agents.jl, trouble retrieving agent velocity](https://discourse.julialang.org/t/new-to-agents-jl-trouble-retrieving-agent-velocity/125469)

<div class="topic-metadata">

**Author:** [@NaixNix](https://discourse.julialang.org/u/NaixNix)\
**Replies:** 4\
**Last updated:** [February 8, 2025, 6:24pm UTC](https://discourse.julialang.org/t/new-to-agents-jl-trouble-retrieving-agent-velocity/125469 "2025-02-08T18:24:11Z")

</div>

Is there a way to retrieve each agent’s velocity in the Agents.jl flocking model per time step of the abmvideo command? For reference, the abmvideo command goes abmvideo( "flocking.mp4", model; agent\_marker = bi…

---

## [Errors when running a Universal Differential Equation (UDE)](https://discourse.julialang.org/t/errors-when-running-a-universal-differential-equation-ude/125273)

<div class="topic-metadata">

**Author:** [@Ashima\_Kalathingal](https://discourse.julialang.org/u/Ashima_Kalathingal)\
**Replies:** 8\
**Last updated:** [February 8, 2025, 12:50pm UTC](https://discourse.julialang.org/t/errors-when-running-a-universal-differential-equation-ude/125273 "2025-02-08T12:50:58Z")

</div>

Hello, I am building a UDE as a part of my work in Julia. I am using the following example as reference https://docs.sciml.ai/Overview/stable/showcase/missing\_physics/ Unfortunately I am getting a warning message and …

---

## [Precompilation: Why does order matter when "using" packages for the first time?](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 26\
**Last updated:** [February 7, 2025, 2:03pm UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056 "2025-02-07T14:03:53Z")

</div>

Last night, I was trying to get a Lux tutorial running. This was the order in the tutorial: using Lux, ComponentArrays, SciMLSensitivity, LuxAMDGPU, LuxCUDA, Optimisers, OrdinaryDiffEq, Random, Statistics, Zygote, OneHo…

---

## [Trying to build Julia documentation for v11.1.3 but Manifest says v11.1.1](https://discourse.julialang.org/t/trying-to-build-julia-documentation-for-v11-1-3-but-manifest-says-v11-1-1/125649)

<div class="topic-metadata">

**Author:** [@Alexey\_Bogdanov](https://discourse.julialang.org/u/Alexey_Bogdanov)\
**Replies:** 3\
**Last updated:** [February 7, 2025, 12:34pm UTC](https://discourse.julialang.org/t/trying-to-build-julia-documentation-for-v11-1-3-but-manifest-says-v11-1-1/125649 "2025-02-07T12:34:12Z")

</div>

Hi guys! I’m trying to build base html documentation for Julia v11.1.3 but in doc/Manifest.toml there is another version: v11.1.1 here and I think that is the reason of failing with such error: ERROR: LoadError: Unabl…

---

## [Cannot add ImageView package](https://discourse.julialang.org/t/cannot-add-imageview-package/125512)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 27\
**Last updated:** [February 6, 2025, 11:21pm UTC](https://discourse.julialang.org/t/cannot-add-imageview-package/125512 "2025-02-06T23:21:27Z")

</div>

Hello I get a ton of warning while trying to install ImageView on Ubuntu 24.10 with Julia 1.11.3. At the end ImageView is not installed. julia\> Pkg.add("ImageView") Resolving package versions... No Changes to \`~/.…

---

## [Receiving the Error: "MethodError: no method matching eps(::Int64)" When Using NonlinearProblem Solver](https://discourse.julialang.org/t/receiving-the-error-methoderror-no-method-matching-eps-int64-when-using-nonlinearproblem-solver/125514)

<div class="topic-metadata">

**Author:** [@mcket747](https://discourse.julialang.org/u/mcket747)\
**Replies:** 8\
**Last updated:** [February 6, 2025, 9:43pm UTC](https://discourse.julialang.org/t/receiving-the-error-methoderror-no-method-matching-eps-int64-when-using-nonlinearproblem-solver/125514 "2025-02-06T21:43:24Z")

</div>

Hello, I am attempting to solve a non-linear optimization problem using the NonlinearProblem solver with the TrustRegion method. I kept getting the error saying there was no method for Float64(::ForwardDiff Dual etc). I …

---

## [Any updates on using AMDGPU in WSL?](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617)

<div class="topic-metadata">

**Author:** [@ed123](https://discourse.julialang.org/u/ed123)\
**Replies:** 8\
**Last updated:** [February 6, 2025, 4:46pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617 "2025-02-06T16:46:22Z")

</div>

I have seen the previous question here which said that AMDGPU was still unsupported in Windows as of a year ago. Is this possible in 2025? I have done the following steps so far: installed WSL2 (Ubuntu 24.04) installe…

---

## [Segfault using Flux + Intel integrated GPU](https://discourse.julialang.org/t/segfault-using-flux-intel-integrated-gpu/125626)

<div class="topic-metadata">

**Author:** [@ed123](https://discourse.julialang.org/u/ed123)\
**Replies:** 2\
**Last updated:** [February 6, 2025, 4:17pm UTC](https://discourse.julialang.org/t/segfault-using-flux-intel-integrated-gpu/125626 "2025-02-06T16:17:44Z")

</div>

I am trying to use Flux on my laptop’s GPU (Intel Iris Xe, Linux) and it immediately segfaults. I realise that this isn’t a powerful GPU but it even happens on a trivial model (see Quick Start · Flux from the Flux docs). …

---

## [How to iterate over Vector{String} elements and append a string to them](https://discourse.julialang.org/t/how-to-iterate-over-vector-string-elements-and-append-a-string-to-them/125616)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 4\
**Last updated:** [February 6, 2025, 1:56pm UTC](https://discourse.julialang.org/t/how-to-iterate-over-vector-string-elements-and-append-a-string-to-them/125616 "2025-02-06T13:56:03Z")

</div>

Hi, I have the Vector{String}, e.g., vec = \["P1", "P2", ..., "Pn", "SC", "TC"\] and I would like therefrom to create the corresponding modified Vector{String}: vec\_mod = \["P1\_O", "P1\_D", "P2\_O", "P2\_D", ..., "Pn\_O", "…

---

## [Working with Julia REPL + Vscode + WSL](https://discourse.julialang.org/t/working-with-julia-repl-vscode-wsl/125313)

<div class="topic-metadata">

**Author:** [@ed123](https://discourse.julialang.org/u/ed123)\
**Replies:** 6\
**Last updated:** [February 6, 2025, 11:20am UTC](https://discourse.julialang.org/t/working-with-julia-repl-vscode-wsl/125313 "2025-02-06T11:20:25Z")

</div>

I’ve read previous questions on this topic but I’m still stuck: apologies if this is off-topic. System info: I have the following setup: Hardware: AMD GPU Windows 10 Julia v1.11.2 installed in Windows VSCodium inst…

---

## [Reduce allocations in row-by-row dotproduct](https://discourse.julialang.org/t/reduce-allocations-in-row-by-row-dotproduct/125579)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 5\
**Last updated:** [February 5, 2025, 3:16pm UTC](https://discourse.julialang.org/t/reduce-allocations-in-row-by-row-dotproduct/125579 "2025-02-05T15:16:10Z")

</div>

Hi, I was wondering if there is a better way of writing the function add\_and\_mul below, which is effectively (up to some scaling and addition) trying to compute the dot-product between the various row-vectors in two matr…

---

## [Argument error : invalid NLopt arguments: finite domain required for global algorithm](https://discourse.julialang.org/t/argument-error-invalid-nlopt-arguments-finite-domain-required-for-global-algorithm/125427)

<div class="topic-metadata">

**Author:** [@Somya](https://discourse.julialang.org/u/Somya)\
**Replies:** 13\
**Last updated:** [February 5, 2025, 1:40pm UTC](https://discourse.julialang.org/t/argument-error-invalid-nlopt-arguments-finite-domain-required-for-global-algorithm/125427 "2025-02-05T13:40:16Z")

</div>

Hi, I am trying to run a Julia code to fit a LinearMixedModel and facing an Argument error : invalid NLopt arguments: finite domain required for global algorithm. Julia version I am working on is 1.8.5 Any help will b…

---

## [Can't Pkg.add probably due to bug](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544)

<div class="topic-metadata">

**Author:** [@Andres\_Legarra](https://discourse.julialang.org/u/Andres_Legarra)\
**Replies:** 5\
**Last updated:** [February 5, 2025, 9:05am UTC](https://discourse.julialang.org/t/cant-pkg-add-probably-due-to-bug/125544 "2025-02-05T09:05:57Z")

</div>

Hi we use julia version 1.6.1 in a server (of which I am not root) and all went smoothly for months. Now we can not install packages any longer, instead we get julia\> using Pkg; Pkg.add("Optim") Updating registry…

---

## [Check if vector lies between two vectors element-wise, allocation free](https://discourse.julialang.org/t/check-if-vector-lies-between-two-vectors-element-wise-allocation-free/125537)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 2\
**Last updated:** [February 4, 2025, 5:10pm UTC](https://discourse.julialang.org/t/check-if-vector-lies-between-two-vectors-element-wise-allocation-free/125537 "2025-02-04T17:10:56Z")

</div>

I found some time to profile my code with the intention of reducing memory use and number of allocations. A quick check revealed that the function check\_inequalities was the main culprit for the allocations: in my bigger…

---

## [PDFIO pdPageExtractText](https://discourse.julialang.org/t/pdfio-pdpageextracttext/35781)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 3\
**Last updated:** [February 4, 2025, 12:30pm UTC](https://discourse.julialang.org/t/pdfio-pdpageextracttext/35781 "2025-02-04T12:30:04Z")

</div>

Does anybody work with PDFIO.jl? I need to extract text from pdf, due to limiting of my knowledge, I don’t understand how to use the method to save text to string, which is printing to REPL. doc = pdDocOpen("test.pdf"…

---

## [Reading exact value of a pixel in an indexed (colormap) image](https://discourse.julialang.org/t/reading-exact-value-of-a-pixel-in-an-indexed-colormap-image/125467)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 2\
**Last updated:** [February 2, 2025, 11:31am UTC](https://discourse.julialang.org/t/reading-exact-value-of-a-pixel-in-an-indexed-colormap-image/125467 "2025-02-02T11:31:54Z")

</div>

Hello I have a tiff file with pixel values in one byte and a color table. When I read the file I can display the RGB value of any pixel but want I want is the exact value of the pixel. This is a classified image and I d…

---

## [Strange outcome for the Julia list with different type of elements](https://discourse.julialang.org/t/strange-outcome-for-the-julia-list-with-different-type-of-elements/125409)

<div class="topic-metadata">

**Author:** [@miniskar](https://discourse.julialang.org/u/miniskar)\
**Replies:** 5\
**Last updated:** [February 2, 2025, 5:29am UTC](https://discourse.julialang.org/t/strange-outcome-for-the-julia-list-with-different-type-of-elements/125409 "2025-02-02T05:29:27Z")

</div>

Here is the minimum working example. julia\> f= rand(Float32, 8) 8-element Vector{Float32}: 0.31442094 0.31442094 0.2593087 0.2593087 0.11091578 0.11091578 0.14340413 0.14340413 julia\> i = rand(Int32, 8) 8-eleme…

---

## [Registering packages not hosted on github](https://discourse.julialang.org/t/registering-packages-not-hosted-on-github/81912)

<div class="topic-metadata">

**Author:** [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)\
**Replies:** 29\
**Last updated:** [January 30, 2025, 3:24pm UTC](https://discourse.julialang.org/t/registering-packages-not-hosted-on-github/81912 "2025-01-30T15:24:51Z")

</div>

Hi, Is it possible to register a package that is hosted not on GitHub/GitLab (Codeberg in my case)? Regards, Adam

---

## [Publishing from Codeberg](https://discourse.julialang.org/t/publishing-from-codeberg/125363)

<div class="topic-metadata">

**Author:** [@Soel](https://discourse.julialang.org/u/Soel)\
**Replies:** 3\
**Last updated:** [January 29, 2025, 10:47pm UTC](https://discourse.julialang.org/t/publishing-from-codeberg/125363 "2025-01-29T22:47:08Z")

</div>

Hello Julians, I am trying to publish a package… developing on codeberg (codeberg.org), I wonder how to publish it from there. Mirror it to github and try to register? Thanks.

---

## [Julialauncher vs Julia REPL](https://discourse.julialang.org/t/julialauncher-vs-julia-repl/125308)

<div class="topic-metadata">

**Author:** [@Owen77S](https://discourse.julialang.org/u/Owen77S)\
**Replies:** 7\
**Last updated:** [January 29, 2025, 8:24pm UTC](https://discourse.julialang.org/t/julialauncher-vs-julia-repl/125308 "2025-01-29T20:24:42Z")

</div>

Hi, I’m a new user of Julia and I’m a bit confused something. What’s the difference between launching julia in a terminal (with the command julia) and launching it by executing a random file ?

[Previous page](https://discourse.julialang.org/c/first-steps/8.md?page=20)

[Next page](https://discourse.julialang.org/c/first-steps/8.md?page=22)
