# General Usage

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

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

**Page:** 386

---

## [Converting columns in a DataFrame from String to Date (with a specific format)](https://discourse.julialang.org/t/converting-columns-in-a-dataframe-from-string-to-date-with-a-specific-format/76697)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 14\
**Last updated:** [October 10, 2022, 2:15pm UTC](https://discourse.julialang.org/t/converting-columns-in-a-dataframe-from-string-to-date-with-a-specific-format/76697 "2022-10-10T14:15:32Z")

</div>

I am trying to convert a DataFrame column populated with dates whose type is String and format DD/MM/YYYY to dates with Date type and format YYYYMMDD Tried A\[!,:DATE\] = parse.(Date, A\[!,:DATE\]) But it errors, with: Ar…

---

## [Dynamic documents](https://discourse.julialang.org/t/dynamic-documents/88450)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 6\
**Last updated:** [October 10, 2022, 8:13am UTC](https://discourse.julialang.org/t/dynamic-documents/88450 "2022-10-10T08:13:27Z")

</div>

I need to produce printable output where some parts are “interpolated” similar to the strings containing julia variables, but somewhat more generally, to include generated graphs as well as text. Weave.jl seems abandoned…

---

## [C++ code much faster than Julia how can I optimize it?](https://discourse.julialang.org/t/c-code-much-faster-than-julia-how-can-i-optimize-it/87868)

<div class="topic-metadata">

**Author:** [@Adegasel](https://discourse.julialang.org/u/Adegasel)\
**Replies:** 40\
**Last updated:** [October 10, 2022, 6:09am UTC](https://discourse.julialang.org/t/c-code-much-faster-than-julia-how-can-i-optimize-it/87868 "2022-10-10T06:09:39Z")

</div>

I’m trying to adapt this C++ code to Julia (here my translation). However C++ original code is much faster than Julia. How can I optimize it?

---

## [Better way to save Lux model and parameters](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506)

<div class="topic-metadata">

**Author:** [@Molox](https://discourse.julialang.org/u/Molox)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 5:44am UTC](https://discourse.julialang.org/t/better-way-to-save-lux-model-and-parameters/88506 "2022-10-10T05:44:04Z")

</div>

I was using Flux and BSON to save the model. Now I am switching to Lux now and I know the model, parameters, and states are separated. The parameters are Component Arrays and I am not sure how to save them properly. (…

---

## [Avoiding allocations in small subvector ops](https://discourse.julialang.org/t/avoiding-allocations-in-small-subvector-ops/88500)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 1:03am UTC](https://discourse.julialang.org/t/avoiding-allocations-in-small-subvector-ops/88500 "2022-10-10T01:03:07Z")

</div>

In the code below, there is an allocation each time the statement u\[i1:i1+1\].=... is executed. A few years ago, I wrote a quick-and-dirty macro to implement statements like this with a for-loop like the commented-out lo…

---

## [Interoperability with .NET](https://discourse.julialang.org/t/interoperability-with-net/19611)

<div class="topic-metadata">

**Author:** [@rudreshahk](https://discourse.julialang.org/u/rudreshahk)\
**Replies:** 41\
**Last updated:** [October 9, 2022, 9:40pm UTC](https://discourse.julialang.org/t/interoperability-with-net/19611 "2022-10-09T21:40:23Z")

</div>

We have some Dimension Selector built in .NET which i want to invoke from Julia. IS there any Julia to .NET interoperability tools? I have used R.NET for R to .NET connection and Pythonnet for Python to .NET connection.…

---

## [PackageCompiler: does \`precompile\` store machine code?](https://discourse.julialang.org/t/packagecompiler-does-precompile-store-machine-code/88480)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 3\
**Last updated:** [October 9, 2022, 9:40pm UTC](https://discourse.julialang.org/t/packagecompiler-does-precompile-store-machine-code/88480 "2022-10-09T21:40:05Z")

</div>

You can pass Julia code to create\_sysimage using: precompile\_execution\_file / precompile\_statements\_file; and script Do I have it correct that the first option only stores type inference in the sysimage, and not gene…

---

## [Searching of the online documentation of Julia ineffective](https://discourse.julialang.org/t/searching-of-the-online-documentation-of-julia-ineffective/88493)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [October 9, 2022, 6:32pm UTC](https://discourse.julialang.org/t/searching-of-the-online-documentation-of-julia-ineffective/88493 "2022-10-09T18:32:05Z")

</div>

Searching the documentation is frustrating. Lots of barely relevant hits. Some things will never be found. Etc. On the other hand, full-text searching of the PDF is a breeze. So, I wonder if it would be possible to em…

---

## [Why does JET.jl has a problem with adding a column to a dataframe?](https://discourse.julialang.org/t/why-does-jet-jl-has-a-problem-with-adding-a-column-to-a-dataframe/88490)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 5:54pm UTC](https://discourse.julialang.org/t/why-does-jet-jl-has-a-problem-with-adding-a-column-to-a-dataframe/88490 "2022-10-09T17:54:56Z")

</div>

I started using JET.jl recently. In most cases it is helpful. However, sometimes I just cannot figure out why it has a problem with my code. An example is below. The function foo is very basic and works fine. Still, JET.…

---

## [How to Plot inside For Loop for Differential Equation](https://discourse.julialang.org/t/how-to-plot-inside-for-loop-for-differential-equation/88478)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 2:36pm UTC](https://discourse.julialang.org/t/how-to-plot-inside-for-loop-for-differential-equation/88478 "2022-10-09T14:36:35Z")

</div>

Hi all, I read this topic but it is not helping me to plot in a looping: I want to plot functions of: p = 900 +e^{t/2} p = 900 +50e^{t/2} p = 900 +100e^{t/2} p = 900 +150e^{t/2} p = 900 +200e^{t/2} p = 900 -50e…

---

## [ConvexBodyProximityQueries False Collision Detection and Proximity](https://discourse.julialang.org/t/convexbodyproximityqueries-false-collision-detection-and-proximity/88249)

<div class="topic-metadata">

**Author:** [@karelispanagiotis](https://discourse.julialang.org/u/karelispanagiotis)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 12:36pm UTC](https://discourse.julialang.org/t/convexbodyproximityqueries-false-collision-detection-and-proximity/88249 "2022-10-09T12:36:20Z")

</div>

I have been using the package ConvexBodyProximityQueries and I cannot find the reason why it fails to calculate the distance between the following 3D Triangles. If I reverse the arguments order, I get the correct answer…

---

## [Create a new sheet in an excel file](https://discourse.julialang.org/t/create-a-new-sheet-in-an-excel-file/88432)

<div class="topic-metadata">

**Author:** [@Zizilabg](https://discourse.julialang.org/u/Zizilabg)\
**Replies:** 8\
**Last updated:** [October 9, 2022, 9:43am UTC](https://discourse.julialang.org/t/create-a-new-sheet-in-an-excel-file/88432 "2022-10-09T09:43:48Z")

</div>

Hello, I would like to create a new sheet in an excel file that already has two sheets. I wrote this but it erased all my data… Can someone explain me how to do it? XLSX.openxlsx("choix élèves julia.xlsx", mode="w") do…

---

## [Sudden, strong increase in compilation times, that is fixed by emptying \`~/.julia/compiled/\`](https://discourse.julialang.org/t/sudden-strong-increase-in-compilation-times-that-is-fixed-by-emptying-julia-compiled/88467)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 5:43am UTC](https://discourse.julialang.org/t/sudden-strong-increase-in-compilation-times-that-is-fixed-by-emptying-julia-compiled/88467 "2022-10-09T05:43:55Z")

</div>

As it says in the title. Is this a known phenomenon? Specifics: Precompiling and loading a custom package of mine takes normally about 20 seconds max. One day, it started taking 130 seconds, without any substantial c…

---

## [VSCode Intellisense](https://discourse.julialang.org/t/vscode-intellisense/88202)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 4\
**Last updated:** [October 9, 2022, 1:44am UTC](https://discourse.julialang.org/t/vscode-intellisense/88202 "2022-10-09T01:44:27Z")

</div>

Hi, I have been using Julia for a few years and never had intellisense working but now I want to try it. I have checked a bunch of settings, reinstalled Julia, the extension, and VSCode, rebooted heaps, but still I get…

---

## [Reduce the batches of a Parallel Ensemble Problem to the mean of the square modulus](https://discourse.julialang.org/t/reduce-the-batches-of-a-parallel-ensemble-problem-to-the-mean-of-the-square-modulus/88359)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 8\
**Last updated:** [October 8, 2022, 11:21pm UTC](https://discourse.julialang.org/t/reduce-the-batches-of-a-parallel-ensemble-problem-to-the-mean-of-the-square-modulus/88359 "2022-10-08T23:21:11Z")

</div>

Hi, I’m performing a generic EnsembleProblem. Let’s take a simple example prob = ODEProblem((u,p,t)-\>1.01u,0.5,(0.0,1.0)) function prob\_func(prob,i,repeat) remake(prob,u0=rand()\*prob.u0) end ensemble\_prob = Ensembl…

---

## [Weird behaviour of "setdiff"](https://discourse.julialang.org/t/weird-behaviour-of-setdiff/88110)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 10\
**Last updated:** [October 8, 2022, 9:14pm UTC](https://discourse.julialang.org/t/weird-behaviour-of-setdiff/88110 "2022-10-08T21:14:35Z")

</div>

I just found that the weird behaviour of “setdiff” in the 1.8.2, as can be seen in the following figure: I think the “correct” result should be ‘\[’, ‘1’, '1, ‘\]’. Such a minor change leads to unexpected behaviour of a…

---

## [Julia 1.8.2 sefaulting when trying to install a package](https://discourse.julialang.org/t/julia-1-8-2-sefaulting-when-trying-to-install-a-package/88461)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 10\
**Last updated:** [October 8, 2022, 9:20pm UTC](https://discourse.julialang.org/t/julia-1-8-2-sefaulting-when-trying-to-install-a-package/88461 "2022-10-08T21:20:47Z")

</div>

This is a fresh install of 1.8.2. Julia 1.7.3 works fine and is stable. (@v1.8) pkg\> add LinearAlgebra signal (11): Segmentation fault in expression starting at none:0 \_\_pthread\_mutex\_init at /usr/lib/x86\_64-linux-gnu/…

---

## [Error in variables linear regression](https://discourse.julialang.org/t/error-in-variables-linear-regression/58109)

<div class="topic-metadata">

**Author:** [@Okarin99](https://discourse.julialang.org/u/Okarin99)\
**Replies:** 6\
**Last updated:** [October 8, 2022, 6:31pm UTC](https://discourse.julialang.org/t/error-in-variables-linear-regression/58109 "2022-10-08T18:31:51Z")

</div>

Hi, how can I do an error in variables regression in Julia? I didn‘t find anything online about this and I don‘t know what to do with the measurement uncertainties when I want to fit my model. Have a nice day and thank…

---

## [Human readable error messages](https://discourse.julialang.org/t/human-readable-error-messages/28789)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 16\
**Last updated:** [October 8, 2022, 6:15pm UTC](https://discourse.julialang.org/t/human-readable-error-messages/28789 "2022-10-08T18:15:57Z")

</div>

I find run-time error messages that are displayed in the REPL hard to parse. Perhaps this could be improved fairly easily. But first I wanted to check whether I am the only one who feels this way. Here is a simple exam…

---

## [Distance to theoretical performance limit](https://discourse.julialang.org/t/distance-to-theoretical-performance-limit/88443)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 1\
**Last updated:** [October 8, 2022, 3:20pm UTC](https://discourse.julialang.org/t/distance-to-theoretical-performance-limit/88443 "2022-10-08T15:20:58Z")

</div>

Is it possible to know the distance to the theoretical performance limit for a function? The limit could be based on hardware, a fast benchmark language like C, or Julia itself. The reason I ask is that sometimes I wish…

---

## [Parallel implementation is not very effective](https://discourse.julialang.org/t/parallel-implementation-is-not-very-effective/88323)

<div class="topic-metadata">

**Author:** [@CarlosContrerasQ12](https://discourse.julialang.org/u/CarlosContrerasQ12)\
**Replies:** 19\
**Last updated:** [October 8, 2022, 8:28am UTC](https://discourse.julialang.org/t/parallel-implementation-is-not-very-effective/88323 "2022-10-08T08:28:37Z")

</div>

Hi, I’m new to Julia and parallel programming and I’m having trouble with a parallel implementation. I need to assemble a matrix by calculating 10 individual blocks, each one taking approximately 18 seconds of computing …

---

## [Cannot \`convert\` an object of type Missing to an object of type Float64](https://discourse.julialang.org/t/cannot-convert-an-object-of-type-missing-to-an-object-of-type-float64/88421)

<div class="topic-metadata">

**Author:** [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Replies:** 3\
**Last updated:** [October 8, 2022, 12:53am UTC](https://discourse.julialang.org/t/cannot-convert-an-object-of-type-missing-to-an-object-of-type-float64/88421 "2022-10-08T00:53:55Z")

</div>

I’m trying to read some data out of a NetCDF file and then convert it to Float64. Below is my code. Would you please help me address this error? My code: using NCDatasets ds1 = NCDataset("test.nc"); Var0 = ds1\["Variabl…

---

## [M1 MacBook, macOS/Julia 1.8 update issue: "cannot find libpython"](https://discourse.julialang.org/t/m1-macbook-macos-julia-1-8-update-issue-cannot-find-libpython/88419)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 2\
**Last updated:** [October 7, 2022, 9:31pm UTC](https://discourse.julialang.org/t/m1-macbook-macos-julia-1-8-update-issue-cannot-find-libpython/88419 "2022-10-07T21:31:35Z")

</div>

Just upgraded to Julia 1.8.2, under macOS 12.6. python is installed via homebrew. I am getting the following error when running update: julia\> import Pkg julia\> Pkg.build("PyCall") Building Conda ─→ \`~/.julia/scrat…

---

## [Is there an error with the Sundials package (part of DifferentialEquations package)?](https://discourse.julialang.org/t/is-there-an-error-with-the-sundials-package-part-of-differentialequations-package/88341)

<div class="topic-metadata">

**Author:** [@Kentaurkogen](https://discourse.julialang.org/u/Kentaurkogen)\
**Replies:** 10\
**Last updated:** [October 7, 2022, 4:29pm UTC](https://discourse.julialang.org/t/is-there-an-error-with-the-sundials-package-part-of-differentialequations-package/88341 "2022-10-07T16:29:18Z")

</div>

Hello guys (this is my first topic) I’m trying to download the DIfferentialEquations package in order to solve some ODEs. However, I have a real difficulty downloading the sundials package which is installed during add …

---

## [Ranking of elements of a vector](https://discourse.julialang.org/t/ranking-of-elements-of-a-vector/88293)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 13\
**Last updated:** [October 7, 2022, 3:17pm UTC](https://discourse.julialang.org/t/ranking-of-elements-of-a-vector/88293 "2022-10-07T15:17:59Z")

</div>

I have a vector A. I need a vector RA which ranks each element of A. Is there a better way to do this than what I have below? A = \[4;2;5;1;6;7\] RA = sum((A .== sort(A)') .\* cumsum(ones(length(A)))', dims=2) display(\[A …

---

## [Ncurses does not work](https://discourse.julialang.org/t/ncurses-does-not-work/88373)

<div class="topic-metadata">

**Author:** [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Replies:** 3\
**Last updated:** [October 7, 2022, 3:00pm UTC](https://discourse.julialang.org/t/ncurses-does-not-work/88373 "2022-10-07T15:00:22Z")

</div>

Dear community, any idea how I should set up ncurses? # test-curses.jl using Ncurses\_jll ccall(("initscr", libncurses), Cvoid, ()) ccall(("getch", libncurses), Cint, ()) ccall(("endwin", libncurses), Cvoid, ()) output…

---

## [WebIO Jupyter extension not working](https://discourse.julialang.org/t/webio-jupyter-extension-not-working/84340)

<div class="topic-metadata">

**Author:** [@Aminath\_Shausan](https://discourse.julialang.org/u/Aminath_Shausan)\
**Replies:** 6\
**Last updated:** [October 7, 2022, 2:35pm UTC](https://discourse.julialang.org/t/webio-jupyter-extension-not-working/84340 "2022-10-07T14:35:44Z")

</div>

Hi I am trying to replicate the interactive plots examples using Interact.jl package (Tutorial · Interact) on a Jupiter notebook. But running into problem with detecting WebIO. This is the first time I had to use WebIO …

---

## [How to save vector of vectors with different dimensions?](https://discourse.julialang.org/t/how-to-save-vector-of-vectors-with-different-dimensions/88354)

<div class="topic-metadata">

**Author:** [@elii17](https://discourse.julialang.org/u/elii17)\
**Replies:** 3\
**Last updated:** [October 7, 2022, 2:08pm UTC](https://discourse.julialang.org/t/how-to-save-vector-of-vectors-with-different-dimensions/88354 "2022-10-07T14:08:18Z")

</div>

Hey ! I am looking for the optimal way of saving a vector of vectors in which each vector has different dimensions. The major problem is that I cannot save it as a df then get it as a CSV file… Thanks for your help !

---

## [Julia simulations in the cloud - for dummies](https://discourse.julialang.org/t/julia-simulations-in-the-cloud-for-dummies/88395)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 1:24pm UTC](https://discourse.julialang.org/t/julia-simulations-in-the-cloud-for-dummies/88395 "2022-10-07T13:24:13Z")

</div>

I am working through a simulation project that requires too much memory for my PC. Also, I need concurrency to cut down the time needed to complete all simulations. I have no experience with cloud computing and I hope s…

---

## [Range behavior for Float32](https://discourse.julialang.org/t/range-behavior-for-float32/88393)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 11:57am UTC](https://discourse.julialang.org/t/range-behavior-for-float32/88393 "2022-10-07T11:57:29Z")

</div>

I ran into the following issue on Julia 1.7.1: dt = 4.0e-9 l32 = 23\_849\_999 t = collect(0.0:dt:dt\*l32) # Vector{Float64} with 23850000 elements t0 = collect(LinRange(0.0, dt, l32+1)) # Vector{Float64} with 23850000 elem…

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

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