# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=553

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

**Page:** 554

---

## [How to resize REPL without exiting julia?](https://discourse.julialang.org/t/how-to-resize-repl-without-exiting-julia/67372)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [August 30, 2021, 4:51pm UTC](https://discourse.julialang.org/t/how-to-resize-repl-without-exiting-julia/67372 "2021-08-30T16:51:35Z")

</div>

Question: How can I resize the REPL without exiting julia? Background: In the example above I just started julia within an ssh session on an hpc compute node, I have to do it this way because the vscode julia termina…

---

## [Call for a data structure that is: multi-dimensional, columnar-typed, and in-memory in the core Julia language](https://discourse.julialang.org/t/call-for-a-data-structure-that-is-multi-dimensional-columnar-typed-and-in-memory-in-the-core-julia-language/64524)

<div class="topic-metadata">

**Author:** [@aiqc](https://discourse.julialang.org/u/aiqc)\
**Replies:** 15\
**Last updated:** [August 30, 2021, 4:42pm UTC](https://discourse.julialang.org/t/call-for-a-data-structure-that-is-multi-dimensional-columnar-typed-and-in-memory-in-the-core-julia-language/64524 "2021-08-30T16:42:49Z")

</div>

It appears that the entire Julia data science ecosystem is built around Julia’s Array. However, from what I’ve observed, Array’s flexibility makes it too disuniform to serve as an in-memory data structure for sharing inf…

---

## [How to improve runtime with measurements.jl?](https://discourse.julialang.org/t/how-to-improve-runtime-with-measurements-jl/67343)

<div class="topic-metadata">

**Author:** [@Cevheriferd](https://discourse.julialang.org/u/Cevheriferd)\
**Replies:** 11\
**Last updated:** [August 30, 2021, 4:35pm UTC](https://discourse.julialang.org/t/how-to-improve-runtime-with-measurements-jl/67343 "2021-08-30T16:35:19Z")

</div>

Dear all, I am using the measurements.jl package to calculate the error in my dataset. I have an array with voltage values which all have their own uncertainty. But when I want to calculate the mean of the array, it tak…

---

## [Unexpected allocations when accessing IdDict](https://discourse.julialang.org/t/unexpected-allocations-when-accessing-iddict/65996)

<div class="topic-metadata">

**Author:** [@StefanMathis](https://discourse.julialang.org/u/StefanMathis)\
**Replies:** 9\
**Last updated:** [August 30, 2021, 4:28pm UTC](https://discourse.julialang.org/t/unexpected-allocations-when-accessing-iddict/65996 "2021-08-30T16:28:18Z")

</div>

Hello, I found that accessing an IdDict can lead to memory allocations, while accessing a Dict does not. I first encountered this behaviour in combination with the Memoization.jl package, therefore the original thread c…

---

## [Test fails when run through Pkg.test() but not when run interactively](https://discourse.julialang.org/t/test-fails-when-run-through-pkg-test-but-not-when-run-interactively/67352)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 6\
**Last updated:** [August 30, 2021, 4:07pm UTC](https://discourse.julialang.org/t/test-fails-when-run-through-pkg-test-but-not-when-run-interactively/67352 "2021-08-30T16:07:38Z")

</div>

Hello, we have encountered a weird error. We have some package and when I run the test in repl, the test fails. But when we run the tests using Pkg.test(), the test fails. We have been expecting that it is due to diffe…

---

## [Term representation in SymbolicUtils/Symbolics -- rational polynomial form, and future changes](https://discourse.julialang.org/t/term-representation-in-symbolicutils-symbolics-rational-polynomial-form-and-future-changes/67367)

<div class="topic-metadata">

**Author:** [@shashi](https://discourse.julialang.org/u/shashi)\
**Replies:** 0\
**Last updated:** [August 30, 2021, 3:57pm UTC](https://discourse.julialang.org/t/term-representation-in-symbolicutils-symbolics-rational-polynomial-form-and-future-changes/67367 "2021-08-30T15:57:33Z")

</div>

Hi all! I wanted to post an update about the recent changes in SymbolicUtils that I’m looking forward to bug-fixing and making very good. An explanation of this representation is written up here In summary, we have …

---

## [How to avoid evaluation into the global space when the expression is not know in advance](https://discourse.julialang.org/t/how-to-avoid-evaluation-into-the-global-space-when-the-expression-is-not-know-in-advance/67342)

<div class="topic-metadata">

**Author:** [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Replies:** 31\
**Last updated:** [August 30, 2021, 3:05pm UTC](https://discourse.julialang.org/t/how-to-avoid-evaluation-into-the-global-space-when-the-expression-is-not-know-in-advance/67342 "2021-08-30T15:05:00Z")

</div>

input = Dict("x"=\>ones(10),"y"=\>2\*ones(10),"z"=\>3\*ones(10)) expr\_list = DataFrame(var=\["v1","v2","v3"\],expr = \["x\*y","y/z","x+y+z"\]) output = Dict() I have a dictionary of input storing the values of some variables x,…

---

## [How to run multiple threads, all using the same sequence of pseudorandom numbers, in Julia?](https://discourse.julialang.org/t/how-to-run-multiple-threads-all-using-the-same-sequence-of-pseudorandom-numbers-in-julia/67334)

<div class="topic-metadata">

**Author:** [@erwanlecarpentier](https://discourse.julialang.org/u/erwanlecarpentier)\
**Replies:** 9\
**Last updated:** [August 30, 2021, 2:22pm UTC](https://discourse.julialang.org/t/how-to-run-multiple-threads-all-using-the-same-sequence-of-pseudorandom-numbers-in-julia/67334 "2021-08-30T14:22:19Z")

</div>

Hey! I would like to run a function multiple times in parallel using the same sequence of random numbers for each call. The only thing that should change between each call is some given parameters. Here is a MWE using R…

---

## [Thread safe cache](https://discourse.julialang.org/t/thread-safe-cache/62210)

<div class="topic-metadata">

**Author:** [@maarten\_van\_damme](https://discourse.julialang.org/u/maarten_van_damme)\
**Replies:** 4\
**Last updated:** [August 30, 2021, 1:44pm UTC](https://discourse.julialang.org/t/thread-safe-cache/62210 "2021-08-30T13:44:12Z")

</div>

I’ve been running into issues with WignerSymbols.jl, where one of the necessary operations is calculating the prime factorization of certain numbers. To speed this up you’d want to cache any found prime factors, and this…

---

## [All about totalvar](https://discourse.julialang.org/t/all-about-totalvar/67350)

<div class="topic-metadata">

**Author:** [@Naba7](https://discourse.julialang.org/u/Naba7)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 1:31pm UTC](https://discourse.julialang.org/t/all-about-totalvar/67350 "2021-08-30T13:31:49Z")

</div>

The official docs of totalvar(X) says if X is a matrix, then the totalvar(X) == sum(Diagonal(X)) but clearly in the testsit is showing a different value. You can check line 146.

---

## [Code review for my first package](https://discourse.julialang.org/t/code-review-for-my-first-package/58574)

<div class="topic-metadata">

**Author:** [@Ihar\_Kudraucau](https://discourse.julialang.org/u/Ihar_Kudraucau)\
**Replies:** 1\
**Last updated:** [August 30, 2021, 12:32pm UTC](https://discourse.julialang.org/t/code-review-for-my-first-package/58574 "2021-08-30T12:32:01Z")

</div>

Hello colleagues, I’ve created my first Julia package: GitHub - xyxel/RedisGraph.jl: RedisGraph Julia client I will be very grateful if somebody review the package in order to check that code is Julia-friendly. Thank …

---

## [(Not) Giving up on dispatch](https://discourse.julialang.org/t/not-giving-up-on-dispatch/66797)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 23\
**Last updated:** [August 30, 2021, 12:05pm UTC](https://discourse.julialang.org/t/not-giving-up-on-dispatch/66797 "2021-08-30T12:05:47Z")

</div>

In another post, I got the comment …the code you’ve posted here was not one of the recommended ways of doing … Reason is, I could not reasonably put all conditions into regular dispatch (functions with the same name …

---

## [FunctionWrappers and kwargs](https://discourse.julialang.org/t/functionwrappers-and-kwargs/67339)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 1\
**Last updated:** [August 30, 2021, 11:21am UTC](https://discourse.julialang.org/t/functionwrappers-and-kwargs/67339 "2021-08-30T11:21:27Z")

</div>

I see FunctionWrappers.jl as a critical tool to enable precompilation of code that takes functions as inputs, and hence reduce latency in such cases. I think the package is a crucial tool in the Julia language, since the…

---

## [PlotlyJS: faceted density heatmaps](https://discourse.julialang.org/t/plotlyjs-faceted-density-heatmaps/67313)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 9:10am UTC](https://discourse.julialang.org/t/plotlyjs-faceted-density-heatmaps/67313 "2021-08-30T09:10:37Z")

</div>

Hi, I am trying to replicate the code that produces a faceted density heatmap using the “tips” data frame. The code I am trying to replicate is this: using PlotlyJS, CSV, DataFrames df = dataset(DataFrame, "tips") plo…

---

## [Unsure about counts and proportions](https://discourse.julialang.org/t/unsure-about-counts-and-proportions/67333)

<div class="topic-metadata">

**Author:** [@Naba7](https://discourse.julialang.org/u/Naba7)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 9:01am UTC](https://discourse.julialang.org/t/unsure-about-counts-and-proportions/67333 "2021-08-30T09:01:05Z")

</div>

isequal(proportions(\[1, 2, 2, 3, 4, 5, 5, 5, 7, 7\], s1), counts(\[1, 2, 2, 3, 4, 5, 5, 5, 7, 7\], s1)/length(\[1, 2, 2, 3, 4, 5, 5, 5, 7, 7\])) when s1 = span(\[1, 2, 2, 3, 4, 5, 5, 5, 7, 7\]) gives false while proportions(…

---

## [Is there any good way to check gradient calculated by Zygote.jl](https://discourse.julialang.org/t/is-there-any-good-way-to-check-gradient-calculated-by-zygote-jl/59782)

<div class="topic-metadata">

**Author:** [@Richard-Li](https://discourse.julialang.org/u/Richard-Li)\
**Replies:** 8\
**Last updated:** [August 30, 2021, 8:58am UTC](https://discourse.julialang.org/t/is-there-any-good-way-to-check-gradient-calculated-by-zygote-jl/59782 "2021-08-30T08:58:07Z")

</div>

Hi there, I’d like to know is there any good way to check the gradient of custom matrix functions calculated by Zygote.jl. like this one: function my\_custom\_matrix\_func(m) return sum(m \* m') end I know FiniteDif…

---

## [How to get the same "random" numbers on Julia and R. seed](https://discourse.julialang.org/t/how-to-get-the-same-random-numbers-on-julia-and-r-seed/17689)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 11\
**Last updated:** [August 30, 2021, 8:54am UTC](https://discourse.julialang.org/t/how-to-get-the-same-random-numbers-on-julia-and-r-seed/17689 "2021-08-30T08:54:14Z")

</div>

If I run this code on R set.seed(123) runif(1) I get 0.2875775 But if I run on Julia using Random Random.seed!(123); rand(1,1) I get 0.7684476751965699 I guess they use different methods to generate ra…

---

## [Towards an eachsliceX function](https://discourse.julialang.org/t/towards-an-eachslicex-function/67145)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 3\
**Last updated:** [August 30, 2021, 8:48am UTC](https://discourse.julialang.org/t/towards-an-eachslicex-function/67145 "2021-08-30T08:48:55Z")

</div>

eachslice does the opposite of what I would like. For instance, if X is a 3D array, then eachslice(X,dims=1) gives an iterator over 2D matrices. Rather, I would like an iterator over all ‘column vectors’, like eachcol().…

---

## [Pretty print BenchmarkGroup](https://discourse.julialang.org/t/pretty-print-benchmarkgroup/67332)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 0\
**Last updated:** [August 30, 2021, 8:06am UTC](https://discourse.julialang.org/t/pretty-print-benchmarkgroup/67332 "2021-08-30T08:06:10Z")

</div>

How can I pretty print the results from a BenchmarkGroup suite? I swear I’ve seen nice tables of results before, but it is Monday and my google-fu is failing me.

---

## [Why does julia systematically fails when doing \\ operation?](https://discourse.julialang.org/t/why-does-julia-systematically-fails-when-doing-operation/67242)

<div class="topic-metadata">

**Author:** [@hdcpereira](https://discourse.julialang.org/u/hdcpereira)\
**Replies:** 10\
**Last updated:** [August 30, 2021, 7:45am UTC](https://discourse.julialang.org/t/why-does-julia-systematically-fails-when-doing-operation/67242 "2021-08-30T07:45:05Z")

</div>

The problem Ax=b for square A is solved by the \\ function. With that in mind, I’ve tried to do the following: A = rand(1:4,3,3) x = fill(1.0, 3) b = A \* x A\\b For some reason, the code …

---

## [Should we improve the text output of Profile.print()?](https://discourse.julialang.org/t/should-we-improve-the-text-output-of-profile-print/67310)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 5:52am UTC](https://discourse.julialang.org/t/should-we-improve-the-text-output-of-profile-print/67310 "2021-08-30T05:52:34Z")

</div>

Currently, if you profile the function mentioned in ProfileView.jl’s README and Profile.print() you get the following output. using Profile function profile\_test(n) for i = 1:n A = randn(100,100,20) …

---

## [How to print a vector as a column vector?](https://discourse.julialang.org/t/how-to-print-a-vector-as-a-column-vector/67291)

<div class="topic-metadata">

**Author:** [@qdmj](https://discourse.julialang.org/u/qdmj)\
**Replies:** 5\
**Last updated:** [August 29, 2021, 6:58pm UTC](https://discourse.julialang.org/t/how-to-print-a-vector-as-a-column-vector/67291 "2021-08-29T18:58:23Z")

</div>

In REPL, I can call a = \[1,2\] to get 2-element Vector{Int64}: 1 2 However, when I run a script and call print(a) , I can just get \[1, 2\] as an row vector. Then is there a method to get a column vector as o…

---

## [Alternative to mutable named tuple?](https://discourse.julialang.org/t/alternative-to-mutable-named-tuple/38375)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 14\
**Last updated:** [August 27, 2021, 11:10pm UTC](https://discourse.julialang.org/t/alternative-to-mutable-named-tuple/38375 "2021-08-27T23:10:42Z")

</div>

For many of my ad-hoc projects I’ve started using Vectors of NamedTuples rather than Vectors of structs because I get the same performance with the benefit of being able to slightly nicer syntax and being able to change …

---

## [How to write in .parquet (or any compressed extension)](https://discourse.julialang.org/t/how-to-write-in-parquet-or-any-compressed-extension/67264)

<div class="topic-metadata">

**Author:** [@Caique\_Rodrigues](https://discourse.julialang.org/u/Caique_Rodrigues)\
**Replies:** 3\
**Last updated:** [August 29, 2021, 11:06pm UTC](https://discourse.julialang.org/t/how-to-write-in-parquet-or-any-compressed-extension/67264 "2021-08-29T23:06:20Z")

</div>

I’m doing some simulation that the output can be around 1GB to 10GB, it’s not so big but we are probably going to run lots of simulations. Right now we are saving the output in .txt, but I’d like to write it in a better …

---

## [Document(er) mystery](https://discourse.julialang.org/t/document-er-mystery/67306)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 7\
**Last updated:** [August 29, 2021, 9:48pm UTC](https://discourse.julialang.org/t/document-er-mystery/67306 "2021-08-29T21:48:55Z")

</div>

I use project - specific files in docs, Project.toml and Manifest.toml. I wish to run docs: name: Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: julia-actions/…

---

## [Change the diagonal of an AbstractMatrix in place](https://discourse.julialang.org/t/change-the-diagonal-of-an-abstractmatrix-in-place/67294)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 2\
**Last updated:** [August 29, 2021, 5:30pm UTC](https://discourse.julialang.org/t/change-the-diagonal-of-an-abstractmatrix-in-place/67294 "2021-08-29T17:30:17Z")

</div>

To add an AbstractVector v to the diagonal of an AbstractMatrix M, one can do using LinearAlgebra M + Diagonal(v) Is there a way to do the same thing without creating a new matrix (i.e., modify M in place)? I’m lookin…

---

## [How to modify marker style in Pyplot?](https://discourse.julialang.org/t/how-to-modify-marker-style-in-pyplot/67293)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 1\
**Last updated:** [August 29, 2021, 4:48pm UTC](https://discourse.julialang.org/t/how-to-modify-marker-style-in-pyplot/67293 "2021-08-29T16:48:45Z")

</div>

Hello, I am using PyPlot to draw a plot. What are the parameters for the fill color, line, and size fo the markers? I am using myPlot = plot(col\_x, col\_y, linestyle = "none", marker = "o", color = "black") but if I u…

---

## [Bug? parse(Integer, ...) calls typemax](https://discourse.julialang.org/t/bug-parse-integer-calls-typemax/67252)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 15\
**Last updated:** [August 29, 2021, 1:47pm UTC](https://discourse.julialang.org/t/bug-parse-integer-calls-typemax/67252 "2021-08-29T13:47:06Z")

</div>

Is this a bug parse(Integer, "1234567890987654321234567890") ERROR: MethodError: no method matching typemax(::Type{Integer}) Closest candidates are: typemax(!Matched::Union{Dates.DateTime, Type{Dates.DateTime}}) at C:…

---

## [Nemo fmpq rationals](https://discourse.julialang.org/t/nemo-fmpq-rationals/67263)

<div class="topic-metadata">

**Author:** [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Replies:** 3\
**Last updated:** [August 29, 2021, 12:08pm UTC](https://discourse.julialang.org/t/nemo-fmpq-rationals/67263 "2021-08-29T12:08:51Z")

</div>

Hi everybody, I’m making some experiments with Nemo package. The ZZ (fmtz) representation of integers is perfect. QQ (fmtq) seems quite good too, but … I have some overflow problem. QQ identifies with Rational{BigIn…

---

## [CxxWrap-based wrapper throws error in running finalizer: ReadOnlyMemoryError()](https://discourse.julialang.org/t/cxxwrap-based-wrapper-throws-error-in-running-finalizer-readonlymemoryerror/67097)

<div class="topic-metadata">

**Author:** [@stemann](https://discourse.julialang.org/u/stemann)\
**Replies:** 1\
**Last updated:** [August 29, 2021, 8:58am UTC](https://discourse.julialang.org/t/cxxwrap-based-wrapper-throws-error-in-running-finalizer-readonlymemoryerror/67097 "2021-08-29T08:58:49Z")

</div>

Hi I am updating a CxxWrap-based wrapper for a C++ library from Julia 1.0 and CxxWrap 0.8.1 - with succesful unit tests - and a dev container - to Julia 1.6 (1.3+) and the latest released CxxWrap, 0.11.2: https://github…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=552)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=554)
