# New to Julia

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

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

**Page:** 44

---

## [Why does Appending a Dataframe to an Arrow file Change the column type?](https://discourse.julialang.org/t/why-does-appending-a-dataframe-to-an-arrow-file-change-the-column-type/115378)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 1\
**Last updated:** [June 9, 2024, 7:37am UTC](https://discourse.julialang.org/t/why-does-appending-a-dataframe-to-an-arrow-file-change-the-column-type/115378 "2024-06-09T07:37:32Z")

</div>

Hi, Suppose I have the following DataFrame with non specified Column type. Q = DataFrame(datmonth = \[\], datstat =\[\], qrytime = \[\]) 0×3 DataFrame Row │ datmonth datstat qrytime │ Any Any Any ───…

---

## [Comparison of Julia with statically typed languages](https://discourse.julialang.org/t/comparison-of-julia-with-statically-typed-languages/115348)

<div class="topic-metadata">

**Author:** [@patrick-nicodemus](https://discourse.julialang.org/u/patrick-nicodemus)\
**Replies:** 10\
**Last updated:** [June 9, 2024, 3:52am UTC](https://discourse.julialang.org/t/comparison-of-julia-with-statically-typed-languages/115348 "2024-06-09T03:52:01Z")

</div>

First let me say I know nothing about Julia. I have read the following StackExchange post: As the author says, Julia is dynamically typed. However, as Julia’s website explains, the semantics of Julia are more restrict…

---

## [Method Error for ForwardDiff.hessian when ForwardDiff.Jacobian and ForwardDiff.gradient works perfectly fine. How to resolve?](https://discourse.julialang.org/t/method-error-for-forwarddiff-hessian-when-forwarddiff-jacobian-and-forwarddiff-gradient-works-perfectly-fine-how-to-resolve/115152)

<div class="topic-metadata">

**Author:** [@ij05](https://discourse.julialang.org/u/ij05)\
**Replies:** 18\
**Last updated:** [June 7, 2024, 11:09pm UTC](https://discourse.julialang.org/t/method-error-for-forwarddiff-hessian-when-forwarddiff-jacobian-and-forwarddiff-gradient-works-perfectly-fine-how-to-resolve/115152 "2024-06-07T23:09:26Z")

</div>

Hello all, This conversation is in continuation with the conversation I had here. I wanted to find the partial double and mixed derivatives of the variables c1,c2 and c3 with respect to the two variables theta and psi. …

---

## [Insert package version number at top of documentation](https://discourse.julialang.org/t/insert-package-version-number-at-top-of-documentation/115350)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 2\
**Last updated:** [June 7, 2024, 9:48pm UTC](https://discourse.julialang.org/t/insert-package-version-number-at-top-of-documentation/115350 "2024-06-07T21:48:42Z")

</div>

Hello, I like to have the version number of the package included in the documentation, so that you can immediately tell if you’re reading the right version of the documentation. To do this, I’ve put the following near t…

---

## [Pyplot in Julia PyError](https://discourse.julialang.org/t/pyplot-in-julia-pyerror/115310)

<div class="topic-metadata">

**Author:** [@Sihyun\_Kim](https://discourse.julialang.org/u/Sihyun_Kim)\
**Replies:** 7\
**Last updated:** [June 7, 2024, 8:33pm UTC](https://discourse.julialang.org/t/pyplot-in-julia-pyerror/115310 "2024-06-07T20:33:59Z")

</div>

Python and matplotlib are installed in anaconda 3. I am trying to import it to julia. I type in repl: using PyPlot Then It shows the following message: \[ Info: Installing matplotlib via the Conda matplotlib package...…

---

## [Encountering Method error when using abs2 function on a Complex{Num}](https://discourse.julialang.org/t/encountering-method-error-when-using-abs2-function-on-a-complex-num/115341)

<div class="topic-metadata">

**Author:** [@vikram\_backup](https://discourse.julialang.org/u/vikram_backup)\
**Replies:** 2\
**Last updated:** [June 7, 2024, 4:00pm UTC](https://discourse.julialang.org/t/encountering-method-error-when-using-abs2-function-on-a-complex-num/115341 "2024-06-07T16:00:34Z")

</div>

I have published my code here: GitHub - VikramD2k/Hydrogen-Atom-Simulator: This computes and plots the probability density of any orbital of the hydrogen atom and I am also pasting my code down below ## using Symbolics…

---

## [Error while installing Packages](https://discourse.julialang.org/t/error-while-installing-packages/115068)

<div class="topic-metadata">

**Author:** [@fsadu](https://discourse.julialang.org/u/fsadu)\
**Replies:** 12\
**Last updated:** [June 7, 2024, 3:33pm UTC](https://discourse.julialang.org/t/error-while-installing-packages/115068 "2024-06-07T15:33:41Z")

</div>

Hi I am new to Julia. When I try to install several packages (JuMP, CSV, …) with import Pkg Pkg.add(“JuMP”) I get Resolving package versions… ERROR: cannot find name corresponding to UUID 8bb1440f-4735-579b-a4ab-40…

---

## [\`MPI.jl\` RMA function's usage](https://discourse.julialang.org/t/mpi-jl-rma-functions-usage/115328)

<div class="topic-metadata">

**Author:** [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Replies:** 11\
**Last updated:** [June 7, 2024, 2:39pm UTC](https://discourse.julialang.org/t/mpi-jl-rma-functions-usage/115328 "2024-06-07T14:39:35Z")

</div>

using MPI MPI.Init() comm = MPI.COMM\_WORLD rank = MPI.Comm\_rank(MPI.COMM\_WORLD) size = MPI.Comm\_size(MPI.COMM\_WORLD) buf = fill(0, 10) win = MPI.MPI\_Win MPI.API.MPI\_Win\_allocate(10\*sizeof(Int), sizeof(Int), MPI.INFO\_NU…

---

## [Behaviour of Ref?](https://discourse.julialang.org/t/behaviour-of-ref/115321)

<div class="topic-metadata">

**Author:** [@dmolina](https://discourse.julialang.org/u/dmolina)\
**Replies:** 1\
**Last updated:** [June 7, 2024, 12:08pm UTC](https://discourse.julialang.org/t/behaviour-of-ref/115321 "2024-06-07T12:08:19Z")

</div>

Hello everybody, I am trying to use Ref to change a variable, and it does not work as expected (at least, as I expected). julia\> a = 5 5 julia\> typeof(a) Int64 julia\> b = Ref(a) Base.RefValue{Int64}(5) julia\> typeof…

---

## [Constructing a diagonal 2D CuArray while preserving Zygote's gradient functionality on the diagonal line](https://discourse.julialang.org/t/constructing-a-diagonal-2d-cuarray-while-preserving-zygotes-gradient-functionality-on-the-diagonal-line/115246)

<div class="topic-metadata">

**Author:** [@hxjz233](https://discourse.julialang.org/u/hxjz233)\
**Replies:** 3\
**Last updated:** [June 6, 2024, 3:12pm UTC](https://discourse.julialang.org/t/constructing-a-diagonal-2d-cuarray-while-preserving-zygotes-gradient-functionality-on-the-diagonal-line/115246 "2024-06-06T15:12:42Z")

</div>

I am a beginner in the use of CUDA and Zygote, and is currently carrying my code from a CPU to a GPU version. In my calculation, I need to put a 1D CuArray on the diagonal line of a 2D CuArray, and do some matrix multip…

---

## [Mul! with 3-dimensional array](https://discourse.julialang.org/t/mul-with-3-dimensional-array/115263)

<div class="topic-metadata">

**Author:** [@Sihyun\_Kim](https://discourse.julialang.org/u/Sihyun_Kim)\
**Replies:** 3\
**Last updated:** [June 6, 2024, 3:08pm UTC](https://discourse.julialang.org/t/mul-with-3-dimensional-array/115263 "2024-06-06T15:08:09Z")

</div>

I am new to Julia. I need to multiply 3 dimensional array by 2 dimensional array. The simplified form is here: vR = fill(1.0, (251, 51, 21)); Π = fill(1.0, (21, 21)); function mat\_mul(A, B) C = similar(A) @inboun…

---

## [How to use Observable to Update Multiple Updates to a GLMakie Animation](https://discourse.julialang.org/t/how-to-use-observable-to-update-multiple-updates-to-a-glmakie-animation/115255)

<div class="topic-metadata">

**Author:** [@Thushara\_Gunaratne](https://discourse.julialang.org/u/Thushara_Gunaratne)\
**Replies:** 1\
**Last updated:** [June 5, 2024, 9:04pm UTC](https://discourse.julialang.org/t/how-to-use-observable-to-update-multiple-updates-to-a-glmakie-animation/115255 "2024-06-05T21:04:44Z")

</div>

I’m trying to generate an animation with multiple observables as in the following code: using GLMakie # Define some sample data (replace with your actual data) x = range(0.0, 2.0, length=101) data1 = Observable(sin.(2\*…

---

## [How to incorporate time dependent interpolation functions while solving ensemble parameter estimation problem?](https://discourse.julialang.org/t/how-to-incorporate-time-dependent-interpolation-functions-while-solving-ensemble-parameter-estimation-problem/115121)

<div class="topic-metadata">

**Author:** [@Piyush](https://discourse.julialang.org/u/Piyush)\
**Replies:** 4\
**Last updated:** [June 5, 2024, 4:37am UTC](https://discourse.julialang.org/t/how-to-incorporate-time-dependent-interpolation-functions-while-solving-ensemble-parameter-estimation-problem/115121 "2024-06-05T04:37:21Z")

</div>

Hi everyone, Data interpolation functions/ objects are not part of the ODE function in my code and also not the part of the parameter list. Example: function V(du, u, p, t) du\[1\] = Rate(t) du\[2\] = p\[1\]\*u\[1\] +…

---

## [Solidworks output from final desiggn](https://discourse.julialang.org/t/solidworks-output-from-final-desiggn/115196)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 3\
**Last updated:** [June 4, 2024, 9:52pm UTC](https://discourse.julialang.org/t/solidworks-output-from-final-desiggn/115196 "2024-06-04T21:52:21Z")

</div>

Hi , I am doing topology optimization using gridap. I want the final design in solidworks format to make it ready for 3d printing. i have my final design as density field. how can i have the solidworks output? thank you …

---

## [Declare tuple type of arbitrary length](https://discourse.julialang.org/t/declare-tuple-type-of-arbitrary-length/115199)

<div class="topic-metadata">

**Author:** [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Replies:** 0\
**Last updated:** [June 4, 2024, 9:41pm UTC](https://discourse.julialang.org/t/declare-tuple-type-of-arbitrary-length/115199 "2024-06-04T21:41:45Z")

</div>

Is there any way I can declare a type for my dictionary with a tuple of the same element type but of arbitrary length? For example I can currently do this: d = Dict{Tuple{Int, Int}, String}() d\[(1, 2)\] = "a" and get a…

---

## [Show operator precedence?](https://discourse.julialang.org/t/show-operator-precedence/115143)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 9\
**Last updated:** [June 4, 2024, 8:22pm UTC](https://discourse.julialang.org/t/show-operator-precedence/115143 "2024-06-04T20:22:28Z")

</div>

In the old days, I used to use a handy utility every once in a while to show how the parser interprets operator precedence: % perl -MO=Deparse,-p -e '$x \< 3 && $y \< 7' (($x \< 3) and ($y \< 7)); I’ve always found this a…

---

## [Using subscript to index an array](https://discourse.julialang.org/t/using-subscript-to-index-an-array/115190)

<div class="topic-metadata">

**Author:** [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Replies:** 4\
**Last updated:** [June 4, 2024, 7:34pm UTC](https://discourse.julialang.org/t/using-subscript-to-index-an-array/115190 "2024-06-04T19:34:05Z")

</div>

Is there any macro or functionality that would allow me to index the elements of an array by subscript? For eg if I had an array: A = \[1, 2, 3\] I would like to have code such as: for i=1:length(A) A\\\_i = A\\\_i \* 3…

---

## [Changing the the bounds for base.rand Float outputs](https://discourse.julialang.org/t/changing-the-the-bounds-for-base-rand-float-outputs/115186)

<div class="topic-metadata">

**Author:** [@ApproximateTruth](https://discourse.julialang.org/u/ApproximateTruth)\
**Replies:** 4\
**Last updated:** [June 4, 2024, 7:30pm UTC](https://discourse.julialang.org/t/changing-the-the-bounds-for-base-rand-float-outputs/115186 "2024-06-04T19:30:39Z")

</div>

Hey new to julia and wondering how to augment the bounds of the base.rand() function for Float64 numbers, I’m trying to get (-1,1) as the new min and max. I checked the documentation on this page and it isn’t clear to m…

---

## [CompatHelper?](https://discourse.julialang.org/t/compathelper/115090)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 8\
**Last updated:** [June 4, 2024, 3:15pm UTC](https://discourse.julialang.org/t/compathelper/115090 "2024-06-04T15:15:38Z")

</div>

I’m getting this error and I have no idea what it means. What is this? remote: Permission to sloisel/MultiGridBarrier.jl.git denied to github-actions\[bot\]. fatal: unable to access 'https://github.com/sloisel/MultiGridBa…

---

## [Change Column Names of a DataFrame - Previous methods don't work](https://discourse.julialang.org/t/change-column-names-of-a-dataframe-previous-methods-dont-work/48026)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 11\
**Last updated:** [June 4, 2024, 11:09am UTC](https://discourse.julialang.org/t/change-column-names-of-a-dataframe-previous-methods-dont-work/48026 "2024-06-04T11:09:43Z")

</div>

Apologies for the repeat of old question, but most of the posts on this question seem to give outdated/nonfunctional solutions for defining or updating the column names of a DataFrame. DataFrame(datamat,names) or name…

---

## [No existing Julia version after installing on Windows and Juliaup won't install new versions](https://discourse.julialang.org/t/no-existing-julia-version-after-installing-on-windows-and-juliaup-wont-install-new-versions/114736)

<div class="topic-metadata">

**Author:** [@ares\_2](https://discourse.julialang.org/u/ares_2)\
**Replies:** 10\
**Last updated:** [June 4, 2024, 8:21am UTC](https://discourse.julialang.org/t/no-existing-julia-version-after-installing-on-windows-and-juliaup-wont-install-new-versions/114736 "2024-06-04T08:21:11Z")

</div>

I’ve just installed Julia on Windows via the Microsoft Store, but I can’t seem to get it working properly. I can’t run the Julia REPL from cmd or the .exe, but I also can’t install any version of Julia by using juliaup. …

---

## [Why don't integer division errors occur in floating point division?](https://discourse.julialang.org/t/why-dont-integer-division-errors-occur-in-floating-point-division/14345)

<div class="topic-metadata">

**Author:** [@hjohnston7](https://discourse.julialang.org/u/hjohnston7)\
**Replies:** 6\
**Last updated:** [June 3, 2024, 2:49pm UTC](https://discourse.julialang.org/t/why-dont-integer-division-errors-occur-in-floating-point-division/14345 "2024-06-03T14:49:02Z")

</div>

Hello! I am currently making my way through the documentation, and I was wondering why the floating point division operator doesn’t throw the same errors as the integer division function. In the documentation, it says: …

---

## [Documenter/CI](https://discourse.julialang.org/t/documenter-ci/114800)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 17\
**Last updated:** [June 3, 2024, 8:04am UTC](https://discourse.julialang.org/t/documenter-ci/114800 "2024-06-03T08:04:55Z")

</div>

Hi, First, let me say that Julia’s packaging (Pkg, PkgTemplates, etc…) is very impressive but also too difficult for dumb mortals like me to understand, unfortunately. I’ve got a package I’m trying to make conform a bit…

---

## [Julia allocates when passing variable to function instead of constant](https://discourse.julialang.org/t/julia-allocates-when-passing-variable-to-function-instead-of-constant/114924)

<div class="topic-metadata">

**Author:** [@kockahonza](https://discourse.julialang.org/u/kockahonza)\
**Replies:** 15\
**Last updated:** [June 2, 2024, 8:44pm UTC](https://discourse.julialang.org/t/julia-allocates-when-passing-variable-to-function-instead-of-constant/114924 "2024-06-02T20:44:40Z")

</div>

Hello everyone, I am very much new to Julia trying to understand how allocations work and how to reduce them. I am writing a small program that reads some files, processes the data and outputs the results. Hence I am rea…

---

## [How to Use Quad Precision Version of DSYEVD Routine in Julia Linear Algebra LAPACK Library?](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 3\
**Last updated:** [June 2, 2024, 6:46pm UTC](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992 "2024-06-02T18:46:11Z")

</div>

I am currently working on a project that involves high-precision computations on real symmetric matrices. Specifically, I need to compute all eigenvalues and, optionally, eigenvectors of these matrices using a quad preci…

---

## [Simple and quick way to factor a polynomial](https://discourse.julialang.org/t/simple-and-quick-way-to-factor-a-polynomial/106403)

<div class="topic-metadata">

**Author:** [@Loves\_Reddit](https://discourse.julialang.org/u/Loves_Reddit)\
**Replies:** 10\
**Last updated:** [June 2, 2024, 3:38pm UTC](https://discourse.julialang.org/t/simple-and-quick-way-to-factor-a-polynomial/106403 "2024-06-02T15:38:49Z")

</div>

Hello I am looking for a simple and quick way I can enter a polynomial like; ax^3 + bx^2 + cx + d and get an output in the format (l + m)(n+ p)(q + r) I am unable to find any quick way online

---

## [How do I precompile a callable struct?](https://discourse.julialang.org/t/how-do-i-precompile-a-callable-struct/115037)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 10\
**Last updated:** [June 2, 2024, 1:45pm UTC](https://discourse.julialang.org/t/how-do-i-precompile-a-callable-struct/115037 "2024-06-02T13:45:49Z")

</div>

I have something like: struct S end (::S)() = true I think precompile(A, ()) would precompile the consstructor A, right? How do I precompile (::S)()? I there a way to verify whether a function has been precompiled? T…

---

## [Is there a concise way to express "\[println(i, j) for i = 1 : j, j = 1:3\]"](https://discourse.julialang.org/t/is-there-a-concise-way-to-express-println-i-j-for-i-1-j-j-1-3/115073)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 4\
**Last updated:** [June 2, 2024, 3:09am UTC](https://discourse.julialang.org/t/is-there-a-concise-way-to-express-println-i-j-for-i-1-j-j-1-3/115073 "2024-06-02T03:09:37Z")

</div>

Hi, is there a concise way to express the “for” circulation like “\[println(i, j) for i = 1 : j, j = 1:3\]”, I encounter the “ERROR: UndefVarError: j not defined”. I thought such an expression is more concise than for j …

---

## [IDA solver error (possibly) for a DAE problem with complex number](https://discourse.julialang.org/t/ida-solver-error-possibly-for-a-dae-problem-with-complex-number/115045)

<div class="topic-metadata">

**Author:** [@Hamed](https://discourse.julialang.org/u/Hamed)\
**Replies:** 11\
**Last updated:** [June 2, 2024, 9:21am UTC](https://discourse.julialang.org/t/ida-solver-error-possibly-for-a-dae-problem-with-complex-number/115045 "2024-06-02T09:21:41Z")

</div>

Hi there. I have a problem with this code here. I’m trying to simulate a three-phase short circuit fault in a power system according to the instructions in Example 2 here: https://github.com/NREL-Sienna/PowerSimulations…

---

## [Implementing LBG algorithm](https://discourse.julialang.org/t/implementing-lbg-algorithm/115066)

<div class="topic-metadata">

**Author:** [@Manasa\_S](https://discourse.julialang.org/u/Manasa_S)\
**Replies:** 4\
**Last updated:** [June 1, 2024, 7:37pm UTC](https://discourse.julialang.org/t/implementing-lbg-algorithm/115066 "2024-06-01T19:37:59Z")

</div>

Hi, I’m new to Julia and wondering how to loop through the generated voronoi cells to implement the MLBG algorithm. using GLMakie using DelaunayTriangulation using Interpolations using Plots function perform\_computat…

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

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