# Latest

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

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

**Page:** 1309

---

## [What package is the Print command in?](https://discourse.julialang.org/t/what-package-is-the-print-command-in/65926)

<div class="topic-metadata">

**Author:** [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)\
**Replies:** 5\
**Last updated:** [August 6, 2021, 8:55am UTC](https://discourse.julialang.org/t/what-package-is-the-print-command-in/65926 "2021-08-06T08:55:40Z")

</div>

I’m getting too much stuff printing to the Julia shell and it’s annoying. I know there’s a Print command that prints to my editor (Pluto in this case), but I forget what package it’s in. Got a reminder? :smiley: Sideno…

---

## [How to display the elements of 1D array in one line?](https://discourse.julialang.org/t/how-to-display-the-elements-of-1d-array-in-one-line/65925)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 6\
**Last updated:** [August 6, 2021, 8:12am UTC](https://discourse.julialang.org/t/how-to-display-the-elements-of-1d-array-in-one-line/65925 "2021-08-06T08:12:00Z")

</div>

I have an array a, a=Array{Float64,1}() for i in 1:10 push!(a,i\*10.0) end display(a) However, println or display, they all show the elements of the array vertically, like below 10-element Array{Float64,1}: 10.0 …

---

## [Typeof a function](https://discourse.julialang.org/t/typeof-a-function/65865)

<div class="topic-metadata">

**Author:** [@Judd](https://discourse.julialang.org/u/Judd)\
**Replies:** 19\
**Last updated:** [August 6, 2021, 8:04am UTC](https://discourse.julialang.org/t/typeof-a-function/65865 "2021-08-06T08:04:21Z")

</div>

What does the output mean? #1, #2, and couting. julia\> typeof((a::Int64) -\> a + 1) var"#1#2" julia\> typeof((a::Int64) -\> a + 1) var"#3#4"

---

## [How to correctly define and use global variables in the module in Julia?](https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 19\
**Last updated:** [August 6, 2021, 7:54am UTC](https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720 "2021-08-06T07:54:52Z")

</div>

In fortran, we know that we can in a module define a global variable (use the private property), so that we can use the subroutines in the module to set or change the values of that variable. That updated variable can be…

---

## [Poor speed gain using \`pmap\`](https://discourse.julialang.org/t/poor-speed-gain-using-pmap/65694)

<div class="topic-metadata">

**Author:** [@Rick](https://discourse.julialang.org/u/Rick)\
**Replies:** 17\
**Last updated:** [August 6, 2021, 8:01am UTC](https://discourse.julialang.org/t/poor-speed-gain-using-pmap/65694 "2021-08-06T08:01:49Z")

</div>

Hi, I am using the pmap function for parallelization. However, the speedup is not satisfactory. The speed gain is very far from linear. As an illustration, I count the time used when each simulation draws 10,000,000 ran…

---

## [User survey and executables](https://discourse.julialang.org/t/user-survey-and-executables/65866)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 3\
**Last updated:** [August 6, 2021, 6:57am UTC](https://discourse.julialang.org/t/user-survey-and-executables/65866 "2021-08-06T06:57:18Z")

</div>

Hi, It seems that based on the user survey being able to generate executables is one of the major issues for users. I see improvements for the other issues all the time (which is great), but I haven’t seen much on how …

---

## [Is there a package for creating custom world](https://discourse.julialang.org/t/is-there-a-package-for-creating-custom-world/65883)

<div class="topic-metadata">

**Author:** [@development\_mentor](https://discourse.julialang.org/u/development_mentor)\
**Replies:** 8\
**Last updated:** [August 6, 2021, 6:35am UTC](https://discourse.julialang.org/t/is-there-a-package-for-creating-custom-world/65883 "2021-08-06T06:35:36Z")

</div>

I’m searching for a package that could create a 3D or 2D costume world. Something like the game world, in which you or artificial agent could interact with the environment. Which would follow rules specified by the creat…

---

## [Logpoints in VS Code](https://discourse.julialang.org/t/logpoints-in-vs-code/65928)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 1\
**Last updated:** [August 6, 2021, 6:29am UTC](https://discourse.julialang.org/t/logpoints-in-vs-code/65928 "2021-08-06T06:29:32Z")

</div>

Does the Julia extension for VS Code support the “logpoints” debugging feature? As far as I can tell, logpoints are currently treated just like breakpoints. Here’s what I tried: Copy this function into a file foo.jl:f…

---

## [Updating the location of a method definition](https://discourse.julialang.org/t/updating-the-location-of-a-method-definition/65247)

<div class="topic-metadata">

**Author:** [@gcv](https://discourse.julialang.org/u/gcv)\
**Replies:** 8\
**Last updated:** [August 6, 2021, 6:28am UTC](https://discourse.julialang.org/t/updating-the-location-of-a-method-definition/65247 "2021-08-06T06:28:58Z")

</div>

Is there a good way to change where Julia thinks a method definition is located (file and line number)? I got halfway there with this: m = first(methods(MyModule.mymethod)) m.file = Symbol("/path/to/real/file") m.line =…

---

## [How to delete the columns of a dataframe that have only positive values?](https://discourse.julialang.org/t/how-to-delete-the-columns-of-a-dataframe-that-have-only-positive-values/65922)

<div class="topic-metadata">

**Author:** [@Vzehnder](https://discourse.julialang.org/u/Vzehnder)\
**Replies:** 1\
**Last updated:** [August 6, 2021, 5:06am UTC](https://discourse.julialang.org/t/how-to-delete-the-columns-of-a-dataframe-that-have-only-positive-values/65922 "2021-08-06T05:06:32Z")

</div>

I’m trying to edit a DataFrame, my objective is to keep the columns in which at least one value is \<=0. For example, using the code using DataFrames data = Dict("A"=\>\[1,7,2\], "B"=\>\[3,-9,-3\], "C"=\>\[3,0,6\], …

---

## [Does Julia have format IO like Fortran or even better?](https://discourse.julialang.org/t/does-julia-have-format-io-like-fortran-or-even-better/65923)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 2\
**Last updated:** [August 6, 2021, 3:29am UTC](https://discourse.julialang.org/t/does-julia-have-format-io-like-fortran-or-even-better/65923 "2021-08-06T03:29:42Z")

</div>

I am 100% sure that Julia have more efficient format IO than Fortran. But could any one advice how to do format IO, or like, is there some packages to use so that the output could be nicer? Thanks! For example, in a Fo…

---

## [Any packages for polychoric correlation?](https://discourse.julialang.org/t/any-packages-for-polychoric-correlation/36515)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 2\
**Last updated:** [August 6, 2021, 2:49am UTC](https://discourse.julialang.org/t/any-packages-for-polychoric-correlation/36515 "2021-08-06T02:49:21Z")

</div>

I’m analyzing a survey that has a lot of ratings scales. Is there a package to do polychoric correlations? If not would anyone be willing to take a crack at creating such a thing?

---

## [\[Symbolics.jl\] Defining √2 as an (unevaluated) symbol](https://discourse.julialang.org/t/symbolics-jl-defining-2-as-an-unevaluated-symbol/65547)

<div class="topic-metadata">

**Author:** [@sbrisard](https://discourse.julialang.org/u/sbrisard)\
**Replies:** 18\
**Last updated:** [August 6, 2021, 12:43am UTC](https://discourse.julialang.org/t/symbolics-jl-defining-2-as-an-unevaluated-symbol/65547 "2021-08-06T00:43:39Z")

</div>

Hello, with a colleague of mine, we are trying to evaluate Symbolics.jl (vs. sympy/SymPy.jl vs. maxima vs. maple). A feature that we would really need would be to define √2 as a symbol, unevaluated. What we have in min…

---

## [How to speed up these functions?](https://discourse.julialang.org/t/how-to-speed-up-these-functions/65728)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 19\
**Last updated:** [August 6, 2021, 12:31am UTC](https://discourse.julialang.org/t/how-to-speed-up-these-functions/65728 "2021-08-06T00:31:36Z")

</div>

I have been working on estimating a model via indirect inference. For that to be feasible I need to speed up these functions that jointly comprise the auxiliary model. Can anyone spot optimizations? set up: using Linea…

---

## [Why does a simple for loop print from the REPL but not from the Atom editor?](https://discourse.julialang.org/t/why-does-a-simple-for-loop-print-from-the-repl-but-not-from-the-atom-editor/65903)

<div class="topic-metadata">

**Author:** [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)\
**Replies:** 2\
**Last updated:** [August 6, 2021, 12:16am UTC](https://discourse.julialang.org/t/why-does-a-simple-for-loop-print-from-the-repl-but-not-from-the-atom-editor/65903 "2021-08-06T00:16:34Z")

</div>

If I do the below in the Atom editor, the cursor in the repl just moves left then right and nothing prints for x in 1:5 print(x) end If I do the same thing in the repl, as below, it prints. What’s going on? julia\> …

---

## [How do I create a Quantum Time Operator with DifferentialEquations?](https://discourse.julialang.org/t/how-do-i-create-a-quantum-time-operator-with-differentialequations/65766)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 3\
**Last updated:** [August 5, 2021, 12:20pm UTC](https://discourse.julialang.org/t/how-do-i-create-a-quantum-time-operator-with-differentialequations/65766 "2021-08-05T12:20:21Z")

</div>

For the special case of unitary matrices, my quantum mechanics books tells me to use Time Evolution Operators. β(t) = exp(-im\*H\*t/h)\*β(0) As far I know, I just need to use Matrix Exponential. First, decompose H = ψ\*λ\*…

---

## [How to prevent using global arrays in iteration in the module](https://discourse.julialang.org/t/how-to-prevent-using-global-arrays-in-iteration-in-the-module/65857)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 11\
**Last updated:** [August 5, 2021, 9:44pm UTC](https://discourse.julialang.org/t/how-to-prevent-using-global-arrays-in-iteration-in-the-module/65857 "2021-08-05T21:44:40Z")

</div>

I have an a little detailed question about how to prevent using global array in iterations in the module. Hopefully someone could give some advice on how to prevent using global arrays. module Mod global AAA=Array{Float…

---

## [Quantile! much faster when called twice with a scalar than once with a vector!](https://discourse.julialang.org/t/quantile-much-faster-when-called-twice-with-a-scalar-than-once-with-a-vector/65188)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 7\
**Last updated:** [August 5, 2021, 9:58pm UTC](https://discourse.julialang.org/t/quantile-much-faster-when-called-twice-with-a-scalar-than-once-with-a-vector/65188 "2021-08-05T21:58:33Z")

</div>

x = rand(Float32, 10000000); @time quantile!(x, \[0.02, 0.98\]) 0.196571 seconds (2 allocations: 160 bytes) 2-element Vector{Float64}: 0.02001022338867188 0.9800319683551788 @time quantile!(x, 0.02) 0.022732 second…

---

## [Do you know "La morra"](https://discourse.julialang.org/t/do-you-know-la-morra/65834)

<div class="topic-metadata">

**Author:** [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Replies:** 2\
**Last updated:** [August 5, 2021, 8:38pm UTC](https://discourse.julialang.org/t/do-you-know-la-morra/65834 "2021-08-05T20:38:51Z")

</div>

Buongiorno a tutti ! Morra is a very old game t learn something about it you can read the wiki or watch this video. Although it seems a little strange, good and bad players exist as well. The game isn’t based only on c…

---

## [Updating gui via callback using Gtk](https://discourse.julialang.org/t/updating-gui-via-callback-using-gtk/34804)

<div class="topic-metadata">

**Author:** [@Noobie76](https://discourse.julialang.org/u/Noobie76)\
**Replies:** 2\
**Last updated:** [February 18, 2020, 8:39pm UTC](https://discourse.julialang.org/t/updating-gui-via-callback-using-gtk/34804 "2020-02-18T20:39:55Z")

</div>

Hi, I’m currently working on a GUI interface for PDE solver with Glk. This Interface should be very basic and just should it make more comfortable to play around with system parameters to reach the best results ffor imag…

---

## [InexactError](https://discourse.julialang.org/t/inexacterror/65907)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 5\
**Last updated:** [August 5, 2021, 8:37pm UTC](https://discourse.julialang.org/t/inexacterror/65907 "2021-08-05T20:37:13Z")

</div>

The following code throws the error InexactError: Int64(0.003781915448214505) and I am unsure why: cost = fill(0,8,8) for i = 2:100 row = Int64(category\[i\]) # category is an Array containing Float64 from 1.0 to 8.0 …

---

## [Runtime increasing as I do more replications](https://discourse.julialang.org/t/runtime-increasing-as-i-do-more-replications/65850)

<div class="topic-metadata">

**Author:** [@worldgiraffe2](https://discourse.julialang.org/u/worldgiraffe2)\
**Replies:** 4\
**Last updated:** [August 5, 2021, 8:36pm UTC](https://discourse.julialang.org/t/runtime-increasing-as-i-do-more-replications/65850 "2021-08-05T20:36:12Z")

</div>

Hi, I’m a new Julia user and would greatly appreciate your help. Currently, I’m running a simulation with multiple replications, as below glob\_result = \[\] for i in 1:n\_rep Random.seed!(1234+i); model\_result = @…

---

## [CUDA memory error while using DifferentialEquations.jl](https://discourse.julialang.org/t/cuda-memory-error-while-using-differentialequations-jl/65855)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 2\
**Last updated:** [August 5, 2021, 7:40pm UTC](https://discourse.julialang.org/t/cuda-memory-error-while-using-differentialequations-jl/65855 "2021-08-05T19:40:39Z")

</div>

Not sure if I could get an answer to this kind of question here, but hopefully someone has an insight. I am solving a differential equation whose solution is in the form of f(z,ω). For each z, f(z,ω) is some sort of di…

---

## [Is Union{Missing, Float64} a concrete type?](https://discourse.julialang.org/t/is-union-missing-float64-a-concrete-type/65901)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 3\
**Last updated:** [August 5, 2021, 7:36pm UTC](https://discourse.julialang.org/t/is-union-missing-float64-a-concrete-type/65901 "2021-08-05T19:36:39Z")

</div>

I am optimising part of a small package and I am trying to remove type instabilities. Since I am working with incomplete time series, I am using Union{Missing, Float64} data. I have read online that you want to use concr…

---

## [\[ANN\] Modia.jl - Modeling and Simulation (version 0.5, major redesign)](https://discourse.julialang.org/t/ann-modia-jl-modeling-and-simulation-version-0-5-major-redesign/65444)

<div class="topic-metadata">

**Author:** [@HildingElmqvist](https://discourse.julialang.org/u/HildingElmqvist)\
**Replies:** 6\
**Last updated:** [August 5, 2021, 6:15pm UTC](https://discourse.julialang.org/t/ann-modia-jl-modeling-and-simulation-version-0-5-major-redesign/65444 "2021-08-05T18:15:57Z")

</div>

Modia.jl version 0.5 (major redesign) Modia is an environment in the form of a Julia package to model and simulate physical systems (electrical, mechanical, thermo-dynamical, etc.) described by differential and algebraic…

---

## [Passing macro as function argument?](https://discourse.julialang.org/t/passing-macro-as-function-argument/65898)

<div class="topic-metadata">

**Author:** [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Replies:** 5\
**Last updated:** [August 5, 2021, 6:07pm UTC](https://discourse.julialang.org/t/passing-macro-as-function-argument/65898 "2021-08-05T18:07:06Z")

</div>

I’m trying to benchmark various parallelization approaches, and realized I’m not sure how to change which macro is called…? Is this possible? function count\_threads(macro\_name=Threads.@threads) n = Threads.nthreads(…

---

## [Running a single Julia script simultaneously on different workers, each with different input parameters](https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902)

<div class="topic-metadata">

**Author:** [@rachithaiyappa](https://discourse.julialang.org/u/rachithaiyappa)\
**Replies:** 0\
**Last updated:** [August 5, 2021, 6:01pm UTC](https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902 "2021-08-05T18:01:30Z")

</div>

I’m trying to run a script main.jl simultaneously on multiple workers, each worker having a different input parameter for the script. The skeleton code looks something like this. This results in a could not open file err…

---

## [Debugging NLopt :FORCED\_STOP](https://discourse.julialang.org/t/debugging-nlopt-forced-stop/65840)

<div class="topic-metadata">

**Author:** [@cricci](https://discourse.julialang.org/u/cricci)\
**Replies:** 6\
**Last updated:** [August 5, 2021, 5:39pm UTC](https://discourse.julialang.org/t/debugging-nlopt-forced-stop/65840 "2021-08-05T17:39:06Z")

</div>

Hello, I have some issue when using NLopt.jl to perform constrained minimization. I have a function that I am trying to maximize, whose value depend from the solution of a system of ODE. However the optimizer suddenly t…

---

## [How to generate reproducible random numbers across versions via package manifest?](https://discourse.julialang.org/t/how-to-generate-reproducible-random-numbers-across-versions-via-package-manifest/65690)

<div class="topic-metadata">

**Author:** [@torgo](https://discourse.julialang.org/u/torgo)\
**Replies:** 27\
**Last updated:** [August 5, 2021, 5:36pm UTC](https://discourse.julialang.org/t/how-to-generate-reproducible-random-numbers-across-versions-via-package-manifest/65690 "2021-08-05T17:36:16Z")

</div>

I am trying to ensure that random numbers generated across different Julia versions are reproducible. I found this part of the documentation: https://docs.julialang.org/en/v1/stdlib/Random/#Reproducibility It has a pa…

---

## [Suggested workflow for handling c src dependencies in packages](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899)

<div class="topic-metadata">

**Author:** [@DrPapa](https://discourse.julialang.org/u/DrPapa)\
**Replies:** 4\
**Last updated:** [August 5, 2021, 5:27pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899 "2021-08-05T17:27:30Z")

</div>

I have a private package (lets call it MyPkg.jl) that requires wrapping a very minimal c library. This c library provides a small subset of the package’s total capabilities. I have been playing w/ BinaryBuilder and I’ve …

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

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