# General Usage

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

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

**Page:** 633

---

## [DataFrame creating a rowmean for 95 columns](https://discourse.julialang.org/t/dataframe-creating-a-rowmean-for-95-columns/56671)

<div class="topic-metadata">

**Author:** [@korilium](https://discourse.julialang.org/u/korilium)\
**Replies:** 6\
**Last updated:** [March 7, 2021, 4:57pm UTC](https://discourse.julialang.org/t/dataframe-creating-a-rowmean-for-95-columns/56671 "2021-03-07T16:57:45Z")

</div>

Hello, I am quite new to Julia and I was wondering how to implement a rowmean using a dataframe type. For Arrays, this is quite easy but I can not seem to figure out how to do it with a dataframe because most transforma…

---

## [Interpolation for 3D data points does not honors the actual data using custom surrogates \`Stheno\`](https://discourse.julialang.org/t/interpolation-for-3d-data-points-does-not-honors-the-actual-data-using-custom-surrogates-stheno/56687)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 0\
**Last updated:** [March 7, 2021, 4:48pm UTC](https://discourse.julialang.org/t/interpolation-for-3d-data-points-does-not-honors-the-actual-data-using-custom-surrogates-stheno/56687 "2021-03-07T16:48:06Z")

</div>

I tried testing the kriging interpolation using custom surrogate function = Stheno for a set of points scattered in 3D space. The interpolated results from the testing doesn’t honors the actual data points. May I know…

---

## [Unrolled loop results in Improbable @benchmark timing](https://discourse.julialang.org/t/unrolled-loop-results-in-improbable-benchmark-timing/56637)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 6\
**Last updated:** [March 7, 2021, 2:18pm UTC](https://discourse.julialang.org/t/unrolled-loop-results-in-improbable-benchmark-timing/56637 "2021-03-07T14:18:30Z")

</div>

The TLDR is why would I get improbably timings when benchmarking passing in by reference i.e. $c but get maybe reasonable timings when passing in the value i.e. ‘c’. And how much can I trust the timing passing in the va…

---

## [How to install the latest package given dependency conflicts](https://discourse.julialang.org/t/how-to-install-the-latest-package-given-dependency-conflicts/56623)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 6\
**Last updated:** [March 7, 2021, 10:38am UTC](https://discourse.julialang.org/t/how-to-install-the-latest-package-given-dependency-conflicts/56623 "2021-03-07T10:38:52Z")

</div>

In a fresh environment I am trying to install DifferentialEquations and Gnuplot 1.30. If I install DifferentialEquations first, I get the latest copy of the package + all the correct dependencies (particular the dependen…

---

## [Equivalent of Rs \`aov(Y ~ B + Error(A/B), data=d)\`](https://discourse.julialang.org/t/equivalent-of-rs-aov-y-b-error-a-b-data-d/56629)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 1\
**Last updated:** [March 7, 2021, 10:22am UTC](https://discourse.julialang.org/t/equivalent-of-rs-aov-y-b-error-a-b-data-d/56629 "2021-03-07T10:22:19Z")

</div>

Is there a julia equivalent of R’s way to compute classical anovas with random effects? For example, is there an easy way to obtain the following result without calling R? julia\> using DataFrames, RCall julia\> df = Da…

---

## [Strange behavior with dataframes in julia 1.6](https://discourse.julialang.org/t/strange-behavior-with-dataframes-in-julia-1-6/56642)

<div class="topic-metadata">

**Author:** [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Replies:** 6\
**Last updated:** [March 7, 2021, 9:04am UTC](https://discourse.julialang.org/t/strange-behavior-with-dataframes-in-julia-1-6/56642 "2021-03-07T09:04:51Z")

</div>

I’m seeing something strange in dataframes. In version 1.5.3, i am using the leftjoin function in dataframes and it works OK df = DataFrame(A = 1:4, B = \["M", "F", "F", "M"\]) df2 = DataFrame(A = 1:4, C = \["M", "F", "F"…

---

## [Generic type parametrized by supertype](https://discourse.julialang.org/t/generic-type-parametrized-by-supertype/56643)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 5\
**Last updated:** [March 7, 2021, 6:17am UTC](https://discourse.julialang.org/t/generic-type-parametrized-by-supertype/56643 "2021-03-07T06:17:21Z")

</div>

Is it possible to create a generic type whose parameter is its supertype? I thought this would be it but it returns false. julia\> struct Foo{T} \<: T where T end julia\> Foo{Int64} \<: Int64 false

---

## [Can't install juliadb](https://discourse.julialang.org/t/cant-install-juliadb/56633)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 2\
**Last updated:** [March 6, 2021, 10:11pm UTC](https://discourse.julialang.org/t/cant-install-juliadb/56633 "2021-03-06T22:11:28Z")

</div>

I’m not sure what my options are here. Thoughts/recommendations? (@v1.5) pkg\> add JuliaDB Resolving package versions… ERROR: Unsatisfiable requirements detected for package Plots \[91a5bcdd\]: Plots \[91a5bcdd\] log: ├…

---

## [Trying to figure out what testing etc libraries I should be using for julia](https://discourse.julialang.org/t/trying-to-figure-out-what-testing-etc-libraries-i-should-be-using-for-julia/56429)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 2\
**Last updated:** [March 6, 2021, 9:09pm UTC](https://discourse.julialang.org/t/trying-to-figure-out-what-testing-etc-libraries-i-should-be-using-for-julia/56429 "2021-03-06T21:09:18Z")

</div>

I’m trying to figure out what testing etc libraries I should be using for julia, especially for property-based testing. I’m aware of SafeTestSets.jl, TestSetExtensions.jl, ReferenceTests.jl, UnitTestDesign.jl, Randomize…

---

## [How to check if a program exists in a system using Julia?](https://discourse.julialang.org/t/how-to-check-if-a-program-exists-in-a-system-using-julia/19604)

<div class="topic-metadata">

**Author:** [@Zranz](https://discourse.julialang.org/u/Zranz)\
**Replies:** 16\
**Last updated:** [March 6, 2021, 8:08pm UTC](https://discourse.julialang.org/t/how-to-check-if-a-program-exists-in-a-system-using-julia/19604 "2021-03-06T20:08:08Z")

</div>

I wanted to query if a program is installed in a Linux system. From bash I would do something as type -p program or similar, as explained here. If I try something such as read(\`type -p program\`) within julia I get an er…

---

## [I'm looking at some nice AVX2 instructions, and I'm wondering if there is a path t](https://discourse.julialang.org/t/im-looking-at-some-nice-avx2-instructions-and-im-wondering-if-there-is-a-path-t/56624)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 6, 2021, 7:13pm UTC](https://discourse.julialang.org/t/im-looking-at-some-nice-avx2-instructions-and-im-wondering-if-there-is-a-path-t/56624 "2021-03-06T19:13:44Z")

</div>

I’m looking at some nice AVX2 instructions, and I’m wondering if there is a path to use this in Julia: https://stackoverflow.com/questions/66347928/simd-unpack-12-bit-fields-to-16-bit Note that the original poster on S…

---

## [Broadcasting with convert](https://discourse.julialang.org/t/broadcasting-with-convert/56619)

<div class="topic-metadata">

**Author:** [@bgroenks](https://discourse.julialang.org/u/bgroenks)\
**Replies:** 2\
**Last updated:** [March 6, 2021, 4:40pm UTC](https://discourse.julialang.org/t/broadcasting-with-convert/56619 "2021-03-06T16:40:49Z")

</div>

Would someone be able to explain to me briefly the mechanics of what should happen when you call convert.(T,a) on an array a? I would think that Base.similar(bc::Broadcasted{DestStyle}, ::Type{ElType}) would get calle…

---

## [Can someone look over my code and identify the error (Linux)](https://discourse.julialang.org/t/can-someone-look-over-my-code-and-identify-the-error-linux/56617)

<div class="topic-metadata">

**Author:** [@Beta\_Raddish](https://discourse.julialang.org/u/Beta_Raddish)\
**Replies:** 7\
**Last updated:** [March 6, 2021, 4:29pm UTC](https://discourse.julialang.org/t/can-someone-look-over-my-code-and-identify-the-error-linux/56617 "2021-03-06T16:29:39Z")

</div>

In my experiments I have been working with the Collatz Conjecture. I thought about running it using multi-threading and it worked when I gave it low number but then seemed to topple over when I started giving it bigger r…

---

## [Is there a way to transpose an array of Any? I have a \`12×500 Array{Any, 2}\` I want](https://discourse.julialang.org/t/is-there-a-way-to-transpose-an-array-of-any-i-have-a-12x500-array-any-2-i-want/56607)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 2\
**Last updated:** [March 6, 2021, 3:39pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-transpose-an-array-of-any-i-have-a-12x500-array-any-2-i-want/56607 "2021-03-06T15:39:27Z")

</div>

Is there a way to transpose an array of Any? I have a 12×500 Array{Any,2} I want it to be 500x12. If I do transpose it throws an error. 500×12 LinearAlgebra.Transpose{Any,Array{Any,2}}: Error showing value of type Linea…

---

## [The LinearAlgebra.jl package's \`inv()\` function does not preserve matrix symmetry](https://discourse.julialang.org/t/the-linearalgebra-jl-packages-inv-function-does-not-preserve-matrix-symmetry/56605)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 4\
**Last updated:** [March 6, 2021, 9:47am UTC](https://discourse.julialang.org/t/the-linearalgebra-jl-packages-inv-function-does-not-preserve-matrix-symmetry/56605 "2021-03-06T09:47:43Z")

</div>

The LinearAlgebra.jl package’s inv() function does not preserve matrix symmetry. while true R = randn((3,3)) R\[2,1\] = R\[1,2\]; R\[3,1\] = R\[1,3\]; R\[2,3\]=R\[3,2\] @assert R == R' @assert inv(R) == inv(R)' end …

---

## [Contourf plot with uneven axes](https://discourse.julialang.org/t/contourf-plot-with-uneven-axes/56603)

<div class="topic-metadata">

**Author:** [@chaseleslie](https://discourse.julialang.org/u/chaseleslie)\
**Replies:** 1\
**Last updated:** [March 6, 2021, 3:56am UTC](https://discourse.julialang.org/t/contourf-plot-with-uneven-axes/56603 "2021-03-06T03:56:29Z")

</div>

I am trying to plot a contourf plot that has uneven axes, like so: using Plots pyplot() contourf(Float64\[k for k in 0:19\], Float64\[k for k in 0:2:38\], rand(20,20)) This produces a plot like on the left: Whereas I…

---

## [Is there a shorter way to write \`for m₁ in axes(M, 1), m₂ in axes(M, 2)\` in the co](https://discourse.julialang.org/t/is-there-a-shorter-way-to-write-for-m-in-axes-m-1-m-in-axes-m-2-in-the-co/56543)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 7\
**Last updated:** [March 5, 2021, 9:10pm UTC](https://discourse.julialang.org/t/is-there-a-shorter-way-to-write-for-m-in-axes-m-1-m-in-axes-m-2-in-the-co/56543 "2021-03-05T21:10:33Z")

</div>

Is there a shorter way to write for m₁ in axes(M, 1), m₂ in axes(M, 2) in the code below? m₁ and m₂ are required. let M = \[1 2 3; 4 5 6\] res = Any\[\] for m₁ in axes(M, 1), m₂ in axes(M, 2) push!(res, (M\[m₁, m₂\])) en…

---

## [Autograd in Flux](https://discourse.julialang.org/t/autograd-in-flux/56378)

<div class="topic-metadata">

**Author:** [@Khemraj\_Shukla](https://discourse.julialang.org/u/Khemraj_Shukla)\
**Replies:** 14\
**Last updated:** [March 5, 2021, 7:52pm UTC](https://discourse.julialang.org/t/autograd-in-flux/56378 "2021-03-05T19:52:47Z")

</div>

Hello All- I need to compute the gradient of output of a neural network w.r.t input. In my case output is vector and input is also vector. I was trying to use gradient routine from Flux package but it was complaing tha…

---

## [Signal (22): SIGABRT](https://discourse.julialang.org/t/signal-22-sigabrt/55524)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 5\
**Last updated:** [March 5, 2021, 6:57pm UTC](https://discourse.julialang.org/t/signal-22-sigabrt/55524 "2021-03-05T18:57:50Z")

</div>

If I add Threads.@threads to a for loop in my script I get this: Assertion failed: new\_time \>= loop-\>time, file src/win/core.c, line 105 signal (22): SIGABRT in expression starting at \<the line of the function call\> cr…

---

## [Image pooling](https://discourse.julialang.org/t/image-pooling/5280)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 10\
**Last updated:** [March 5, 2021, 6:00pm UTC](https://discourse.julialang.org/t/image-pooling/5280 "2021-03-05T18:00:27Z")

</div>

Is there a package that implements image pooling? In more detail: I have a big image and need to downsize it. Say my image is of size 1000x1000 and I want to bring it down to 100x100. What I want to do is tile it with …

---

## [Run full code on VSCode](https://discourse.julialang.org/t/run-full-code-on-vscode/56566)

<div class="topic-metadata">

**Author:** [@Beta\_Raddish](https://discourse.julialang.org/u/Beta_Raddish)\
**Replies:** 4\
**Last updated:** [March 5, 2021, 5:51pm UTC](https://discourse.julialang.org/t/run-full-code-on-vscode/56566 "2021-03-05T17:51:34Z")

</div>

I am still new to the community so if I got this in the wrong section I do apologise. I am using VS Code to edit my Julia programs but from what I can tell I can either run individual lines or code blocks. While these b…

---

## [Basic question, how do I concatenate several strings with a fixed delimiter?](https://discourse.julialang.org/t/basic-question-how-do-i-concatenate-several-strings-with-a-fixed-delimiter/56571)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 5, 2021, 4:41pm UTC](https://discourse.julialang.org/t/basic-question-how-do-i-concatenate-several-strings-with-a-fixed-delimiter/56571 "2021-03-05T16:41:25Z")

</div>

basic question, how do I concatenate several strings with a fixed delimiter? Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack,…

---

## [Multidimensional Real Fast Fourier Transform](https://discourse.julialang.org/t/multidimensional-real-fast-fourier-transform/56498)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 8\
**Last updated:** [March 5, 2021, 4:14pm UTC](https://discourse.julialang.org/t/multidimensional-real-fast-fourier-transform/56498 "2021-03-05T16:14:52Z")

</div>

Hello, I’m using fourier transformations to solve a partial differential equation in two dimensions. Since performance is super important in my case and I only deal with real data, so i’m using the pre-computed plan of …

---

## [Is this a bug, or expected behavior](https://discourse.julialang.org/t/is-this-a-bug-or-expected-behavior/56555)

<div class="topic-metadata">

**Author:** [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)\
**Replies:** 1\
**Last updated:** [March 5, 2021, 1:58pm UTC](https://discourse.julialang.org/t/is-this-a-bug-or-expected-behavior/56555 "2021-03-05T13:58:58Z")

</div>

I’m not really sure if this is a usage question, or more of a design question. I’m on a Linux system and I have a separate disk for my data called Data which is symlinked inside my home directory like this: me@my\_pc ~ …

---

## [Is there a way to make julia aware of ~ as the home directory on linux](https://discourse.julialang.org/t/is-there-a-way-to-make-julia-aware-of-as-the-home-directory-on-linux/56550)

<div class="topic-metadata">

**Author:** [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)\
**Replies:** 7\
**Last updated:** [March 5, 2021, 2:00pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-make-julia-aware-of-as-the-home-directory-on-linux/56550 "2021-03-05T14:00:25Z")

</div>

I work on a Linux system, meaning that in my mind ~ means home directory. Sometimes I like to refer to a config file relative to a home folder in any (Linux) system. Which means that writing ~/.config/file.cfg would be …

---

## [Disable array print clipping in logging macro](https://discourse.julialang.org/t/disable-array-print-clipping-in-logging-macro/56552)

<div class="topic-metadata">

**Author:** [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Replies:** 0\
**Last updated:** [March 5, 2021, 1:19pm UTC](https://discourse.julialang.org/t/disable-array-print-clipping-in-logging-macro/56552 "2021-03-05T13:19:58Z")

</div>

Logging module provides a variable name and value printing function, it is very useful. julia\> a, b, c = rand(3), rand(3), rand(3); julia\> @info "" a b c ┌ Info: │ a = │ 3-element Array{Float64,1}: │ 0.4212448…

---

## [Array indexed by enum](https://discourse.julialang.org/t/array-indexed-by-enum/56510)

<div class="topic-metadata">

**Author:** [@grahamstark](https://discourse.julialang.org/u/grahamstark)\
**Replies:** 3\
**Last updated:** [March 5, 2021, 12:21pm UTC](https://discourse.julialang.org/t/array-indexed-by-enum/56510 "2021-03-05T12:21:22Z")

</div>

Quick question: is there some implementation of an array that could use an enum as an index? Or would it be straightforward to implement one? Where would I start. (Using an enum as an array index is a common thing in lan…

---

## [Help with crash in Oracle with threads](https://discourse.julialang.org/t/help-with-crash-in-oracle-with-threads/56464)

<div class="topic-metadata">

**Author:** [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Replies:** 5\
**Last updated:** [March 5, 2021, 3:26am UTC](https://discourse.julialang.org/t/help-with-crash-in-oracle-with-threads/56464 "2021-03-05T03:26:15Z")

</div>

Hello, I need some help with this crash. I’m using Julia 1.5.3 It appears that when using threading, this crashes Julia. The crash disappears when using a simple for loop. Here is a simple MWE using Oracle conn = Or…

---

## [Bug with DelimtedFiles.readdlm when header=true](https://discourse.julialang.org/t/bug-with-delimtedfiles-readdlm-when-header-true/56057)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 11\
**Last updated:** [March 4, 2021, 9:45pm UTC](https://discourse.julialang.org/t/bug-with-delimtedfiles-readdlm-when-header-true/56057 "2021-03-04T21:45:49Z")

</div>

Hallo, Thanks for providing an easy and fast way to read delimited files. When I use header=true as an option. In the output Data it skips 2 columns instead of 1 which is a bug. Data, Header= DelimtedFiles.readdlm(pa…

---

## [I get this wierd error when i try to implement to\_index with a struct](https://discourse.julialang.org/t/i-get-this-wierd-error-when-i-try-to-implement-to-index-with-a-struct/56503)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [March 4, 2021, 9:44pm UTC](https://discourse.julialang.org/t/i-get-this-wierd-error-when-i-try-to-implement-to-index-with-a-struct/56503 "2021-03-04T21:44:30Z")

</div>

I get this wierd error when i try to implement to\_index with a struct: Base.to\_index(s::State) = CartesianIndex(s.x,s.y) errors with “getindex for Array{Float64,2} with types Tuple{CartesianIndex{2}} is not supported” …

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

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