# New to Julia

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

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

**Page:** 52

---

## [Video creation example does not work to naive way](https://discourse.julialang.org/t/video-creation-example-does-not-work-to-naive-way/111888)

<div class="topic-metadata">

**Author:** [@Julia2001](https://discourse.julialang.org/u/Julia2001)\
**Replies:** 2\
**Last updated:** [March 20, 2024, 7:02pm UTC](https://discourse.julialang.org/t/video-creation-example-does-not-work-to-naive-way/111888 "2024-03-20T19:02:48Z")

</div>

Hi, I would like to create a video from a set of pregenerated PNGs, but the naive way to copy the example from the docs does not work unfortunately. I’ve already adapted the example slightly to call the right(?) load() …

---

## [Convert a number to a byte array](https://discourse.julialang.org/t/convert-a-number-to-a-byte-array/111867)

<div class="topic-metadata">

**Author:** [@robert1](https://discourse.julialang.org/u/robert1)\
**Replies:** 20\
**Last updated:** [March 20, 2024, 5:53pm UTC](https://discourse.julialang.org/t/convert-a-number-to-a-byte-array/111867 "2024-03-20T17:53:15Z")

</div>

how to do it? I’ve been trying to find information for hours. and I don’t understand how to work with bytes ( I’m a C/C++ programmer). NOT WORKING! an example explaining the essence: a = 0x1234 b = Array{UInt8}(undef…

---

## [Create animation from images previously created with Javis or Luxor?](https://discourse.julialang.org/t/create-animation-from-images-previously-created-with-javis-or-luxor/111708)

<div class="topic-metadata">

**Author:** [@Julia2001](https://discourse.julialang.org/u/Julia2001)\
**Replies:** 4\
**Last updated:** [March 20, 2024, 3:49pm UTC](https://discourse.julialang.org/t/create-animation-from-images-previously-created-with-javis-or-luxor/111708 "2024-03-20T15:49:46Z")

</div>

Hello All, as far as I understand creating an animation with Javis (or Luxor) always starts from the “outside” with specifying the number of frames that shall constitute the resulting animation and then calling a drawin…

---

## [Can I use eachrow, eachcol, etc. to change array's values?](https://discourse.julialang.org/t/can-i-use-eachrow-eachcol-etc-to-change-arrays-values/111834)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 9\
**Last updated:** [March 20, 2024, 3:01pm UTC](https://discourse.julialang.org/t/can-i-use-eachrow-eachcol-etc-to-change-arrays-values/111834 "2024-03-20T15:01:00Z")

</div>

Can I use eachrow, eachcol, etc. to change array’s values? For example, x = rand(5, 5) for c in eachcol(x) for el in c if el \< maximum(x)/2 el = 0.0 end end end display(x) does noth…

---

## [Performance of struct](https://discourse.julialang.org/t/performance-of-struct/111873)

<div class="topic-metadata">

**Author:** [@TongTongYee](https://discourse.julialang.org/u/TongTongYee)\
**Replies:** 2\
**Last updated:** [March 20, 2024, 1:17pm UTC](https://discourse.julialang.org/t/performance-of-struct/111873 "2024-03-20T13:17:57Z")

</div>

Hi! I read performance tip of struct in julia manual. https://docs.julialang.org/en/v1/manual/performance-tips/#Avoid-fields-with-abstract-type According to my understanding, performance can be increased by parameteri…

---

## [Integer type promotion behavior](https://discourse.julialang.org/t/integer-type-promotion-behavior/111848)

<div class="topic-metadata">

**Author:** [@byun6jae](https://discourse.julialang.org/u/byun6jae)\
**Replies:** 4\
**Last updated:** [March 20, 2024, 6:25am UTC](https://discourse.julialang.org/t/integer-type-promotion-behavior/111848 "2024-03-20T06:25:21Z")

</div>

I just started learning Julia. I know a bit of Python and R. I have a (probably) simple question about integer type promotion behavior of Julia. julia\> versioninfo() Julia Version 1.10.1 Commit 7790d6f064 (2024-02-13…

---

## [Difference between element-wise allocation and copy()](https://discourse.julialang.org/t/difference-between-element-wise-allocation-and-copy/111803)

<div class="topic-metadata">

**Author:** [@TongTongYee](https://discourse.julialang.org/u/TongTongYee)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 12:28pm UTC](https://discourse.julialang.org/t/difference-between-element-wise-allocation-and-copy/111803 "2024-03-19T12:28:14Z")

</div>

Hi! I was using the elemet-wize allocation ( .= ) as the copy function. But I found that in certain cases, it’s not. I want to know in which case I can use element-wize allocation as the copy function. for example C11…

---

## [Memory{T} in 1.11](https://discourse.julialang.org/t/memory-t-in-1-11/111811)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 1\
**Last updated:** [March 19, 2024, 10:23am UTC](https://discourse.julialang.org/t/memory-t-in-1-11/111811 "2024-03-19T10:23:02Z")

</div>

Hi, While running my code with the 1.11 alpha 2 version of Julia, it broke due (I think) to a change introduced in Julia 1.11. In the following code: d = IOBuffer("hello") dd = d.data dd is a Vector{UInt8} in julia 1…

---

## [Deep Learning Vscode Windows Faster first execution](https://discourse.julialang.org/t/deep-learning-vscode-windows-faster-first-execution/111748)

<div class="topic-metadata">

**Author:** [@jared\_rl](https://discourse.julialang.org/u/jared_rl)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 2:32am UTC](https://discourse.julialang.org/t/deep-learning-vscode-windows-faster-first-execution/111748 "2024-03-19T02:32:53Z")

</div>

Hello! I have been doing some deep reinforcement learning experiments with reinforcementlearning.jl and flux.jl in VScode windows. I have noticed that the first experiment i run after opening Vscode or after restarting …

---

## [MethodError: Cannot \`convert\` an object of type Vector{Float64} to an object of type Float64 in the ODEProblem](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-vector-float64-to-an-object-of-type-float64-in-the-odeproblem/111796)

<div class="topic-metadata">

**Author:** [@Shashank\_Kumar](https://discourse.julialang.org/u/Shashank_Kumar)\
**Replies:** 2\
**Last updated:** [March 19, 2024, 12:29am UTC](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-vector-float64-to-an-object-of-type-float64-in-the-odeproblem/111796 "2024-03-19T00:29:55Z")

</div>

I have been trying to solve this differential equation using ODEProblem whose code is given below, using QuadGK function solve\_eq(a0::Float64) e0 = sqrt(2/(8.85\*10^(-12)\*3\*10^8) \* (0.5 \* 10^(12)/(10^-4))) e\_fiel…

---

## [How to increment CartesianIndex?](https://discourse.julialang.org/t/how-to-increment-cartesianindex/111794)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 10:39pm UTC](https://discourse.julialang.org/t/how-to-increment-cartesianindex/111794 "2024-03-18T22:39:46Z")

</div>

Hello! I think I am just not finding the right command, but how to increment a CartesianIndex? I have a matrix of size 5x5. Suppose I have a cartesian index of CartesianIndex(3,1) how to increment it to CartesianIndex(4…

---

## [Bounds Error In code](https://discourse.julialang.org/t/bounds-error-in-code/111766)

<div class="topic-metadata">

**Author:** [@bongodrums4659](https://discourse.julialang.org/u/bongodrums4659)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 4:30pm UTC](https://discourse.julialang.org/t/bounds-error-in-code/111766 "2024-03-18T16:30:15Z")

</div>

Hi! I keep getting a bounds error and im not sure how to fix it # Define a function to simulate worker paths function simulate\_worker\_paths(solution, a0, y0, T, N) @unpack kgrid, ygrid, policy\_c, policy\_k, P = so…

---

## [Problem installing Plots.jl (a FFMPEG issue)](https://discourse.julialang.org/t/problem-installing-plots-jl-a-ffmpeg-issue/28766)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 47\
**Last updated:** [March 18, 2024, 1:54pm UTC](https://discourse.julialang.org/t/problem-installing-plots-jl-a-ffmpeg-issue/28766 "2024-03-18T13:54:57Z")

</div>

After import Pkg Pkg.add("Plots") Pkg.add("GR") using Plots I get the message: FFMPEG not installed properly, run \] build FFMPEG, restart Julia and try again which I already did, but didn’t work. Any suggestions?

---

## [How to read/process tuple data file](https://discourse.julialang.org/t/how-to-read-process-tuple-data-file/111754)

<div class="topic-metadata">

**Author:** [@tushargayan2324](https://discourse.julialang.org/u/tushargayan2324)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 7:47am UTC](https://discourse.julialang.org/t/how-to-read-process-tuple-data-file/111754 "2024-03-18T07:47:30Z")

</div>

I have saved some data in Julia without any thought for formatting it. The saved file look something like the following; (\[0.123, 0.124, ... ,0.999\], \[0.222, 0.223, ..., 0.999\]) Link: Perc\_SARW\_analysis/data\_files/datf…

---

## [Making Package](https://discourse.julialang.org/t/making-package/111728)

<div class="topic-metadata">

**Author:** [@AbdelazimHussien](https://discourse.julialang.org/u/AbdelazimHussien)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 6:38am UTC](https://discourse.julialang.org/t/making-package/111728 "2024-03-18T06:38:03Z")

</div>

Hello I have a lot of files that runs correctly as individuals. Now, I wanna put them all together in a package. I now that i can test my code using @test but my question is how to go to specific file from terminal? I…

---

## [ERROR: ArgumentError: Git: Global Git config is missing required value 'user.name'](https://discourse.julialang.org/t/error-argumenterror-git-global-git-config-is-missing-required-value-user-name/79026)

<div class="topic-metadata">

**Author:** [@duselguy](https://discourse.julialang.org/u/duselguy)\
**Replies:** 4\
**Last updated:** [March 17, 2024, 7:45pm UTC](https://discourse.julialang.org/t/error-argumenterror-git-global-git-config-is-missing-required-value-user-name/79026 "2024-03-17T19:45:27Z")

</div>

Hello, trying to create package: julia\> using PkgTemplates julia\> t=Template(;user=“duselguy”) or julia\> t=Template() but receive the same error above. .gitconfig contents: \[github\] user = duselguy \[core\] edito…

---

## [Overlaying contour lines for a specific value](https://discourse.julialang.org/t/overlaying-contour-lines-for-a-specific-value/111729)

<div class="topic-metadata">

**Author:** [@dharmik](https://discourse.julialang.org/u/dharmik)\
**Replies:** 0\
**Last updated:** [March 17, 2024, 5:24pm UTC](https://discourse.julialang.org/t/overlaying-contour-lines-for-a-specific-value/111729 "2024-03-17T17:24:37Z")

</div>

Hi! I created a scatter plot representing a ‘matrix’ of values and coloured it in using heatmap. I want to overlay a contour line on it for a specific value in this matrix but I can’t figure out how – any help would be g…

---

## [Coming from python this took a while to figure out](https://discourse.julialang.org/t/coming-from-python-this-took-a-while-to-figure-out/111716)

<div class="topic-metadata">

**Author:** [@Fenrir\_Sivar](https://discourse.julialang.org/u/Fenrir_Sivar)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 8:28am UTC](https://discourse.julialang.org/t/coming-from-python-this-took-a-while-to-figure-out/111716 "2024-03-17T08:28:11Z")

</div>

\# throws a non descriptive error prot\_alphabet=\["R","H","K", "D","E", "S","T","N","C","Q", "C","U","G","P", "A","V","I","L","M","F","Y","W"\] using Flux: onehot…

---

## [Histogram height](https://discourse.julialang.org/t/histogram-height/111699)

<div class="topic-metadata">

**Author:** [@LoneWolf1304](https://discourse.julialang.org/u/LoneWolf1304)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 4:08pm UTC](https://discourse.julialang.org/t/histogram-height/111699 "2024-03-16T16:08:09Z")

</div>

In python matplotlib, the hist() returns an array containing the bin heights of the histogram. How can I do this in julia? as far as i know, the corresponding histogram() function doesn’t return anything. What is the qui…

---

## [Is there a Julia equivalent of Matlab's Array(i) = Value for undefined indicies?](https://discourse.julialang.org/t/is-there-a-julia-equivalent-of-matlabs-array-i-value-for-undefined-indicies/111167)

<div class="topic-metadata">

**Author:** [@MonkeyZK](https://discourse.julialang.org/u/MonkeyZK)\
**Replies:** 15\
**Last updated:** [March 15, 2024, 5:41pm UTC](https://discourse.julialang.org/t/is-there-a-julia-equivalent-of-matlabs-array-i-value-for-undefined-indicies/111167 "2024-03-15T17:41:44Z")

</div>

As the title suggest I was curious if Julia base or LinearAlgebra had some existing equivalent to Matlab’s implementation of assigning values to a non-exisiting index: \>\> Array = \[\]; Array(3) = 3; Array(5) = 5; Array(3,…

---

## [What is the difference between a variable that contains a function an a function?](https://discourse.julialang.org/t/what-is-the-difference-between-a-variable-that-contains-a-function-an-a-function/111652)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 4\
**Last updated:** [March 15, 2024, 9:44am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-a-variable-that-contains-a-function-an-a-function/111652 "2024-03-15T09:44:11Z")

</div>

Why is there a difference between f = x-\>5 and f(x) = 5 Why does the compiler treat these differently? Since if you run both of the above you get ERROR: cannot define function f; it already has a value But they bo…

---

## [Issue with Wildcard Import in Julia Module](https://discourse.julialang.org/t/issue-with-wildcard-import-in-julia-module/111613)

<div class="topic-metadata">

**Author:** [@Daniel\_S](https://discourse.julialang.org/u/Daniel_S)\
**Replies:** 4\
**Last updated:** [March 14, 2024, 2:23pm UTC](https://discourse.julialang.org/t/issue-with-wildcard-import-in-julia-module/111613 "2024-03-14T14:23:15Z")

</div>

I’m encountering an issue with wildcard imports (“import .ModuleName: \*”) in Julia. Specifically, when attempting to import all symbols from a module using the wildcard syntax, the symbols do not seem to be available in …

---

## [Parallel julia code](https://discourse.julialang.org/t/parallel-julia-code/111579)

<div class="topic-metadata">

**Author:** [@AbdelazimHussien](https://discourse.julialang.org/u/AbdelazimHussien)\
**Replies:** 21\
**Last updated:** [March 14, 2024, 1:50pm UTC](https://discourse.julialang.org/t/parallel-julia-code/111579 "2024-03-14T13:50:11Z")

</div>

hello everyone, I have some algorithms that I wanna run them in parallel. I started by learning how to make simple parallel examples. I have the following code but it is not running. can U help me on this function pfl…

---

## [How to create and modify named vector in Julia?](https://discourse.julialang.org/t/how-to-create-and-modify-named-vector-in-julia/111412)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 10\
**Last updated:** [March 14, 2024, 3:33am UTC](https://discourse.julialang.org/t/how-to-create-and-modify-named-vector-in-julia/111412 "2024-03-14T03:33:31Z")

</div>

Hello, I am setting a polynomial function and a vector (array) that passes the parameters to this function, something like this: y = v\[1\]\*x + v\[2\]\*x^2 + v\[3\]\*x^3 It would be easier to remember the elements of the vect…

---

## [Whys is Enzyme code running slow](https://discourse.julialang.org/t/whys-is-enzyme-code-running-slow/111565)

<div class="topic-metadata">

**Author:** [@Arijit\_Bhattacharya](https://discourse.julialang.org/u/Arijit_Bhattacharya)\
**Replies:** 5\
**Last updated:** [March 13, 2024, 6:05pm UTC](https://discourse.julialang.org/t/whys-is-enzyme-code-running-slow/111565 "2024-03-13T18:05:47Z")

</div>

Title: Performance Issues with Enzyme Autodiff in Julia Code I am new to Enzyme. When I run this sample code, the autodiff function is taking a lot of time. Where am I going wrong? using Enzyme function Convec\_diffus…

---

## [How to deploy my Pluto notebook to github?](https://discourse.julialang.org/t/how-to-deploy-my-pluto-notebook-to-github/91775)

<div class="topic-metadata">

**Author:** [@Allan\_Olave](https://discourse.julialang.org/u/Allan_Olave)\
**Replies:** 8\
**Last updated:** [March 11, 2024, 6:11pm UTC](https://discourse.julialang.org/t/how-to-deploy-my-pluto-notebook-to-github/91775 "2024-03-11T18:11:49Z")

</div>

Is it possible to share my pluto notebook(which include PlutoUI, SymPy, Plots) by deploying to github, so that i can share it to my students? Thanks in advance.

---

## [How to increase low speed timeout in Julia?](https://discourse.julialang.org/t/how-to-increase-low-speed-timeout-in-julia/108894)

<div class="topic-metadata">

**Author:** [@ANANDHU\_SURESH\_B14ME](https://discourse.julialang.org/u/ANANDHU_SURESH_B14ME)\
**Replies:** 1\
**Last updated:** [March 13, 2024, 7:45am UTC](https://discourse.julialang.org/t/how-to-increase-low-speed-timeout-in-julia/108894 "2024-03-13T07:45:00Z")

</div>

I am using a corporate laptop with mcafee client proxy and mcafee DLP endpoint agent. I am getting a timeout error while trying to add packages. I had similiar issue in python while downloading large packages with conda,…

---

## [Luxor.textformat() missing?](https://discourse.julialang.org/t/luxor-textformat-missing/111535)

<div class="topic-metadata">

**Author:** [@Julia2001](https://discourse.julialang.org/u/Julia2001)\
**Replies:** 1\
**Last updated:** [March 12, 2024, 6:46pm UTC](https://discourse.julialang.org/t/luxor-textformat-missing/111535 "2024-03-12T18:46:31Z")

</div>

Hi All, I’m experimenting with Luxor and wondering whether Luxor.textformat() has been removed. It’s listed in the examples and the documentation but is missing from the alphabetical list at the end of the documentatio…

---

## [Inherit from a concrete type](https://discourse.julialang.org/t/inherit-from-a-concrete-type/111291)

<div class="topic-metadata">

**Author:** [@Matthijs\_1971](https://discourse.julialang.org/u/Matthijs_1971)\
**Replies:** 6\
**Last updated:** [March 12, 2024, 10:28am UTC](https://discourse.julialang.org/t/inherit-from-a-concrete-type/111291 "2024-03-12T10:28:17Z")

</div>

function func\_a(arg::Vector{\<: Bool}) println(arg) end function func\_b(arg::Vector{Bool}) println(arg) end v = \[true, false, false, true\] func\_a(v) func\_b(v) Does it make sense to use the \<: operator on a concrete…

---

## [Enforcing nonneg. constraint in parameter Optimization](https://discourse.julialang.org/t/enforcing-nonneg-constraint-in-parameter-optimization/111298)

<div class="topic-metadata">

**Author:** [@paul188](https://discourse.julialang.org/u/paul188)\
**Replies:** 1\
**Last updated:** [March 10, 2024, 3:01pm UTC](https://discourse.julialang.org/t/enforcing-nonneg-constraint-in-parameter-optimization/111298 "2024-03-10T15:01:05Z")

</div>

(I moved this post to “New to Julia”) Hi, I am quite new to Julia, so this might be obvious, but I cannot figure it out. I have a model consisting of parameters and a set of ODEs. In the MWE below, I just substitute by…

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

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