# Latest

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

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

**Page:** 1093

---

## [Can't convert column's data type from Char to Any](https://discourse.julialang.org/t/cant-convert-columns-data-type-from-char-to-any/78111)

<div class="topic-metadata">

**Author:** [@janilin](https://discourse.julialang.org/u/janilin)\
**Replies:** 3\
**Last updated:** [March 19, 2022, 7:19am UTC](https://discourse.julialang.org/t/cant-convert-columns-data-type-from-char-to-any/78111 "2022-03-19T07:19:52Z")

</div>

Hi! I was trying to change the data type of a column, but failed. Created a dataframe first: using DataFrames df = DataFrame(x = \[1,2,3\], y = \['a', 'b', 'c'\]); Then tried changing the data type of y column from Char…

---

## [Classical fit Rectangles in Rectangles problematic](https://discourse.julialang.org/t/classical-fit-rectangles-in-rectangles-problematic/76902)

<div class="topic-metadata">

**Author:** [@Hirnfolter1](https://discourse.julialang.org/u/Hirnfolter1)\
**Replies:** 1\
**Last updated:** [March 19, 2022, 7:17am UTC](https://discourse.julialang.org/t/classical-fit-rectangles-in-rectangles-problematic/76902 "2022-03-19T07:17:18Z")

</div>

Hello, I have the following problem and searching for a solution or good Pkg which helps with the problem. I have n-Rectangles of different size and each rectangle has a Value, independent from the size. I also have o…

---

## [Create any functions with a macro, the functions can call each other](https://discourse.julialang.org/t/create-any-functions-with-a-macro-the-functions-can-call-each-other/78113)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [March 19, 2022, 6:09am UTC](https://discourse.julialang.org/t/create-any-functions-with-a-macro-the-functions-can-call-each-other/78113 "2022-03-19T06:09:04Z")

</div>

hello, i need to create any functions with a macro, the functions can call each other. What am I doing wrong ? macro macr(ClassName::Symbol) local Class = @eval $ClassName return esc(quote foo(::Type{$Cl…

---

## [Function not defined when occurring in else-clause inside of another function](https://discourse.julialang.org/t/function-not-defined-when-occurring-in-else-clause-inside-of-another-function/78106)

<div class="topic-metadata">

**Author:** [@Geometh](https://discourse.julialang.org/u/Geometh)\
**Replies:** 2\
**Last updated:** [March 19, 2022, 5:24am UTC](https://discourse.julialang.org/t/function-not-defined-when-occurring-in-else-clause-inside-of-another-function/78106 "2022-03-19T05:24:42Z")

</div>

Hi there, I ran into some weird behavior that I don’t understand. When having two possible function declarations inside an if-else-statement which is wrapped in some outer function, the assignment inside the else-clause…

---

## [Trying to add kernels for Gaussian Process](https://discourse.julialang.org/t/trying-to-add-kernels-for-gaussian-process/78117)

<div class="topic-metadata">

**Author:** [@mirror63](https://discourse.julialang.org/u/mirror63)\
**Replies:** 0\
**Last updated:** [March 19, 2022, 1:54am UTC](https://discourse.julialang.org/t/trying-to-add-kernels-for-gaussian-process/78117 "2022-03-19T01:54:40Z")

</div>

I want to add two kernels for my Gaussian Process, I am using GaussianProcesses.jl . Can somebody give me an example of adding two kernels for a GP. The two kernels I am trying to add are: Periodic + Noise using Gauss…

---

## [Can this be made faster?](https://discourse.julialang.org/t/can-this-be-made-faster/78064)

<div class="topic-metadata">

**Author:** [@r0b0ty](https://discourse.julialang.org/u/r0b0ty)\
**Replies:** 5\
**Last updated:** [March 19, 2022, 1:00am UTC](https://discourse.julialang.org/t/can-this-be-made-faster/78064 "2022-03-19T01:00:39Z")

</div>

I have two DataFrames. The size of the first is (7390, 2), represented below by a small (3, 2) array. The size of the second is quite a bit larger, at (482244, 8), represented below by a larger (7, 4) array. I need to…

---

## [Struct not recognized as the same struct in a different script](https://discourse.julialang.org/t/struct-not-recognized-as-the-same-struct-in-a-different-script/78100)

<div class="topic-metadata">

**Author:** [@Kevin\_Shen1](https://discourse.julialang.org/u/Kevin_Shen1)\
**Replies:** 1\
**Last updated:** [March 19, 2022, 12:57am UTC](https://discourse.julialang.org/t/struct-not-recognized-as-the-same-struct-in-a-different-script/78100 "2022-03-19T00:57:54Z")

</div>

I have a struct called HyperState I’m persisting with JLD2.save() in a Julia script. However when I try to load it back in a Pluto notebook, I get the warning: type Main.HyperState does not exist in workspace; reconstruc…

---

## [How to create a struct that contains an SVector of structs?](https://discourse.julialang.org/t/how-to-create-a-struct-that-contains-an-svector-of-structs/78110)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [March 19, 2022, 12:00am UTC](https://discourse.julialang.org/t/how-to-create-a-struct-that-contains-an-svector-of-structs/78110 "2022-03-19T00:00:10Z")

</div>

The following code does not work: using StaticArrays, Parameters import Base.zero const SEGMENTS = 6 # struct, defining the physical parameters of one spring @with\_kw mutable struct Spring{I, S} p1::I = 1 …

---

## [Categorical to Integer values?](https://discourse.julialang.org/t/categorical-to-integer-values/24588)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 16\
**Last updated:** [March 18, 2022, 11:53pm UTC](https://discourse.julialang.org/t/categorical-to-integer-values/24588 "2022-03-18T23:53:18Z")

</div>

If I have a DataFrame with a categorical column, how can I convert it to integers, like in R if foo is a data table with a categorical variable bar, you would do as.numeric(foo$bar) I plan to index into an array based o…

---

## [Are any Julia 1.5+ books being worked on?](https://discourse.julialang.org/t/are-any-julia-1-5-books-being-worked-on/78001)

<div class="topic-metadata">

**Author:** [@PatrickJulia4all](https://discourse.julialang.org/u/PatrickJulia4all)\
**Replies:** 8\
**Last updated:** [March 18, 2022, 11:39pm UTC](https://discourse.julialang.org/t/are-any-julia-1-5-books-being-worked-on/78001 "2022-03-18T23:39:04Z")

</div>

All I see is 1.0 or partial 1.3 Julia books out there. Does anyone know if any authors are working on new books or new editions covering 1.7 or at least 1.5?? I fear if I learn from a 1.0 book, I will have to unlearn ha…

---

## [Underline numbers in matrix](https://discourse.julialang.org/t/underline-numbers-in-matrix/78112)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [March 18, 2022, 10:55pm UTC](https://discourse.julialang.org/t/underline-numbers-in-matrix/78112 "2022-03-18T22:55:22Z")

</div>

julia\> Matrix(reshape(1:100,10,10)) 10×10 Matrix{Int64}: 1 11 21 31 41 51 61 71 81 91 2 12 22 32 42 52 62 72 82 92 3 13 23 33 43 53 63 73 83 93 4 14 24 34 44 54 64 74 84 94…

---

## [Flux LayerNorm slower than pytorch?](https://discourse.julialang.org/t/flux-layernorm-slower-than-pytorch/78084)

<div class="topic-metadata">

**Author:** [@gpucce](https://discourse.julialang.org/u/gpucce)\
**Replies:** 10\
**Last updated:** [March 18, 2022, 10:46pm UTC](https://discourse.julialang.org/t/flux-layernorm-slower-than-pytorch/78084 "2022-03-18T22:46:38Z")

</div>

I closed a similar topic I opened about one hour ago by mistake, here I try again with clearer example, the issue is that the same LayerNorm layer in pytorch and Flux has large difference in performance and I don’t know …

---

## [Combining CPU and GPU](https://discourse.julialang.org/t/combining-cpu-and-gpu/78097)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 9\
**Last updated:** [March 18, 2022, 9:59pm UTC](https://discourse.julialang.org/t/combining-cpu-and-gpu/78097 "2022-03-18T21:59:56Z")

</div>

Hi, folks. My code runs a function that needs to do a crap top of operations to fill a very long vector. Each position of the vector is independent of the next. I coded this both on the CPU and GPU, with a custom kernel…

---

## [Mutating arrays not supported toy problem](https://discourse.julialang.org/t/mutating-arrays-not-supported-toy-problem/78057)

<div class="topic-metadata">

**Author:** [@Christopher\_Koh](https://discourse.julialang.org/u/Christopher_Koh)\
**Replies:** 5\
**Last updated:** [March 18, 2022, 9:34pm UTC](https://discourse.julialang.org/t/mutating-arrays-not-supported-toy-problem/78057 "2022-03-18T21:34:44Z")

</div>

Hi all so taking the sample code from the flux gradient documentation I can take the gradient however if I switch out the given function predict(x) = W\*x .+ b(the commented line) with a dense layer predict(x) = Dense(5,…

---

## [How to include my module file as a package?](https://discourse.julialang.org/t/how-to-include-my-module-file-as-a-package/75682)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 24\
**Last updated:** [March 18, 2022, 9:24pm UTC](https://discourse.julialang.org/t/how-to-include-my-module-file-as-a-package/75682 "2022-03-18T21:24:10Z")

</div>

I have some user-defined structures and I put them in Module file. module name\_module # here all structures end I want to import my structures from my module as below (as a package), however, I have an error. Any idea …

---

## [VS Code highlighting Language Server crash](https://discourse.julialang.org/t/vs-code-highlighting-language-server-crash/78069)

<div class="topic-metadata">

**Author:** [@regan](https://discourse.julialang.org/u/regan)\
**Replies:** 2\
**Last updated:** [March 18, 2022, 8:49pm UTC](https://discourse.julialang.org/t/vs-code-highlighting-language-server-crash/78069 "2022-03-18T20:49:59Z")

</div>

Hi all, I am experiencing an issue with the Julia Language server on VS Code. I am using the Julia extension v1.6.3 and julia 1.7.2. In general, the issue seems to be around syntax highlighting generator expressions T…

---

## [Question on Type Inference with Anonymous Functions and Broadcast](https://discourse.julialang.org/t/question-on-type-inference-with-anonymous-functions-and-broadcast/78102)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 3\
**Last updated:** [March 18, 2022, 7:42pm UTC](https://discourse.julialang.org/t/question-on-type-inference-with-anonymous-functions-and-broadcast/78102 "2022-03-18T19:42:55Z")

</div>

Hello! I have a question. Consider this function. f(x) = exp(2 \* x) x = range(0, 1, 2^5) If I want to pass x into it I would do f.(x) and if I do @code\_warntype I can see everything is inferred. Body::Vector{Float64}…

---

## [Order of legend entries in AlgebraOfGraphics](https://discourse.julialang.org/t/order-of-legend-entries-in-algebraofgraphics/77753)

<div class="topic-metadata">

**Author:** [@Jakob](https://discourse.julialang.org/u/Jakob)\
**Replies:** 11\
**Last updated:** [March 18, 2022, 6:41pm UTC](https://discourse.julialang.org/t/order-of-legend-entries-in-algebraofgraphics/77753 "2022-03-18T18:41:43Z")

</div>

Hi everyone, does anyone know of a way to specify the order of the legend entries created by AlgebraOfGraphics? In the following, the labels get reordered alphabetically but i’d like them to stay in the original order: …

---

## [Spherical Cap in Julia](https://discourse.julialang.org/t/spherical-cap-in-julia/78027)

<div class="topic-metadata">

**Author:** [@OliveiraIgor](https://discourse.julialang.org/u/OliveiraIgor)\
**Replies:** 3\
**Last updated:** [March 18, 2022, 4:31pm UTC](https://discourse.julialang.org/t/spherical-cap-in-julia/78027 "2022-03-18T16:31:53Z")

</div>

I need to use a set of points from a spherical cap to apply KPCA in Julia, but I don’t know how to create these caps, which idea should I use for this application?

---

## [Are there Julia packages for RNA/DNA/protein structure prediction?](https://discourse.julialang.org/t/are-there-julia-packages-for-rna-dna-protein-structure-prediction/78060)

<div class="topic-metadata">

**Author:** [@BetaQ](https://discourse.julialang.org/u/BetaQ)\
**Replies:** 7\
**Last updated:** [March 18, 2022, 5:39pm UTC](https://discourse.julialang.org/t/are-there-julia-packages-for-rna-dna-protein-structure-prediction/78060 "2022-03-18T17:39:25Z")

</div>

I am doing research about RNA and proteins. Therefore, I am looking for a method to simulate the secondary or 3D structure. I have used some methods based on other programming language constructs. But those methods are n…

---

## [Parallel deployment in DataFrames and CSV operations](https://discourse.julialang.org/t/parallel-deployment-in-dataframes-and-csv-operations/78070)

<div class="topic-metadata">

**Author:** [@AlanAylmer](https://discourse.julialang.org/u/AlanAylmer)\
**Replies:** 6\
**Last updated:** [March 18, 2022, 4:41pm UTC](https://discourse.julialang.org/t/parallel-deployment-in-dataframes-and-csv-operations/78070 "2022-03-18T16:41:39Z")

</div>

Hi. Using Julia happily for 3 years. Just checking before I do some potentially destructive file handling. I have huge amounts of monthly data and I want to clean-reformat it and I have a working code and an 8 core lapt…

---

## [Documentation not deploied with workflow "pages-build-deployment" failing](https://discourse.julialang.org/t/documentation-not-deploied-with-workflow-pages-build-deployment-failing/78089)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 8\
**Last updated:** [March 18, 2022, 4:41pm UTC](https://discourse.julialang.org/t/documentation-not-deploied-with-workflow-pages-build-deployment-failing/78089 "2022-03-18T16:41:18Z")

</div>

This is new to me. The make.jl based workflow to make the documentation is fine but then I have another workflow listed "pages-build-deployment’ that errors and the pages are not updated. I have no idea of what this wo…

---

## [Gillespie simulations: don't deepcopy(JumpProblem)](https://discourse.julialang.org/t/gillespie-simulations-dont-deepcopy-jumpproblem/78073)

<div class="topic-metadata">

**Author:** [@levasco](https://discourse.julialang.org/u/levasco)\
**Replies:** 9\
**Last updated:** [March 18, 2022, 4:10pm UTC](https://discourse.julialang.org/t/gillespie-simulations-dont-deepcopy-jumpproblem/78073 "2022-03-18T16:10:04Z")

</div>

Example from the docs. It seems that deepcopying a JumpProblem object causes each copy to be solved with the same seed. Is this known? using DifferentialEquations using Catalyst sir\_model = @reaction\_network begin β…

---

## [Buffer in running external program in loops](https://discourse.julialang.org/t/buffer-in-running-external-program-in-loops/78087)

<div class="topic-metadata">

**Author:** [@ValentinChb](https://discourse.julialang.org/u/ValentinChb)\
**Replies:** 24\
**Last updated:** [March 18, 2022, 3:39pm UTC](https://discourse.julialang.org/t/buffer-in-running-external-program-in-loops/78087 "2022-03-18T15:39:37Z")

</div>

I’d like to run system calls sequentially in a for loop, waiting for last call to complete before running the next one. The run(command) call is nested in a function (run\_system\_call in the example under) which is part …

---

## [How to reset GPU after launch failure](https://discourse.julialang.org/t/how-to-reset-gpu-after-launch-failure/28768)

<div class="topic-metadata">

**Author:** [@Michael\_Benton](https://discourse.julialang.org/u/Michael_Benton)\
**Replies:** 8\
**Last updated:** [March 18, 2022, 1:49pm UTC](https://discourse.julialang.org/t/how-to-reset-gpu-after-launch-failure/28768 "2022-03-18T13:49:16Z")

</div>

If I write a kernel that fails for whatever reason, julia becomes unable to use the GPU for the remainder of the session example : julia\>cu(\[1.,2.\]) CUDA error: unspecified launch failure (code #719, ERROR\_LAUNCH\_FAIL…

---

## [\[ANN\] Julia for VS Code v1.6](https://discourse.julialang.org/t/ann-julia-for-vs-code-v1-6/78035)

<div class="topic-metadata">

**Author:** [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Replies:** 9\
**Last updated:** [March 18, 2022, 1:48pm UTC](https://discourse.julialang.org/t/ann-julia-for-vs-code-v1-6/78035 "2022-03-18T13:48:35Z")

</div>

Hey everyone, we’ve just released version 1.6 of the Julia extension for VS Code. The highlight of this release is probably the new profile viewer, which should be fairly familiar to Juno users: Check out the docum…

---

## [Simple method for getting indices of a sub array along top, bottom or side of larger matrix A?](https://discourse.julialang.org/t/simple-method-for-getting-indices-of-a-sub-array-along-top-bottom-or-side-of-larger-matrix-a/77977)

<div class="topic-metadata">

**Author:** [@kurt](https://discourse.julialang.org/u/kurt)\
**Replies:** 2\
**Last updated:** [March 18, 2022, 12:55pm UTC](https://discourse.julialang.org/t/simple-method-for-getting-indices-of-a-sub-array-along-top-bottom-or-side-of-larger-matrix-a/77977 "2022-03-18T12:55:59Z")

</div>

I am trying to figure out how to get a sub array out of larger Array, A (MxN). The question is not about whether to use slice or view. I do not need to change the original matrix A, so I will be using slice. I need to ge…

---

## [Writing an exam paper with Julia and Jupyter Lab](https://discourse.julialang.org/t/writing-an-exam-paper-with-julia-and-jupyter-lab/78082)

<div class="topic-metadata">

**Author:** [@Xing\_Shi\_Cai](https://discourse.julialang.org/u/Xing_Shi_Cai)\
**Replies:** 0\
**Last updated:** [March 18, 2022, 12:42pm UTC](https://discourse.julialang.org/t/writing-an-exam-paper-with-julia-and-jupyter-lab/78082 "2022-03-18T12:42:30Z")

</div>

Writing an exam paper with Julia and Jupyter Lab I just taught Linear Algebra, which means I need to give exams with a lot of questions about computations. I would like to have the numbers in this problems to be random, …

---

## [Systems Dynamics in Julia?](https://discourse.julialang.org/t/systems-dynamics-in-julia/73882)

<div class="topic-metadata">

**Author:** [@rpmuller](https://discourse.julialang.org/u/rpmuller)\
**Replies:** 11\
**Last updated:** [March 18, 2022, 12:41pm UTC](https://discourse.julialang.org/t/systems-dynamics-in-julia/73882 "2022-03-18T12:41:34Z")

</div>

Spending a lot of time on the winter break reading Donella Meadows’ books (Thinking in Systems, Limits to Growth and sequels). Seems like a natural extension of the DiffEq.jl framework. Has anyone started anything along …

---

## [Unable to add registries through proxy on Julia 1.7.1, Julia 1.7.0](https://discourse.julialang.org/t/unable-to-add-registries-through-proxy-on-julia-1-7-1-julia-1-7-0/74919)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 10\
**Last updated:** [March 18, 2022, 11:32am UTC](https://discourse.julialang.org/t/unable-to-add-registries-through-proxy-on-julia-1-7-1-julia-1-7-0/74919 "2022-03-18T11:32:08Z")

</div>

I have not managed to run Julia 1.7.1, Julia 1.7.0. Each new version of Julia repeats this problem to me. I have repeated the solutions for the previous versions, without success !!! HELP ME!!! \_ \_ …

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

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