# General Usage

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

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

**Page:** 181

---

## [Voltage source and ideal capacitor. Incorrect problem](https://discourse.julialang.org/t/voltage-source-and-ideal-capacitor-incorrect-problem/112275)

<div class="topic-metadata">

**Author:** [@andrey.ilinskiy](https://discourse.julialang.org/u/andrey.ilinskiy)\
**Replies:** 3\
**Last updated:** [April 11, 2024, 10:07am UTC](https://discourse.julialang.org/t/voltage-source-and-ideal-capacitor-incorrect-problem/112275 "2024-04-11T10:07:11Z")

</div>

Hello, everyone! I have some trouble with simple electric circuit: voltage source and custom RC. If R isn’t equal to zero everything is good, code works. using ModelingToolkit, DifferentialEquations import ModelingToo…

---

## [Help with using @cfunction and arrays](https://discourse.julialang.org/t/help-with-using-cfunction-and-arrays/112717)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 9:33am UTC](https://discourse.julialang.org/t/help-with-using-cfunction-and-arrays/112717 "2024-04-11T09:33:37Z")

</div>

Hi, I try to do Julia C API embedding, and I struggle with using @cfunction to work with arguments of the array type. I get a segmentation fault that is not very clear to me. MWE: Julia code jl\_qeq\_solver.jl: module …

---

## [Precompilation error using Distributed on HPC](https://discourse.julialang.org/t/precompilation-error-using-distributed-on-hpc/109823)

<div class="topic-metadata">

**Author:** [@hijit](https://discourse.julialang.org/u/hijit)\
**Replies:** 4\
**Last updated:** [April 11, 2024, 8:48am UTC](https://discourse.julialang.org/t/precompilation-error-using-distributed-on-hpc/109823 "2024-04-11T08:48:44Z")

</div>

I keep getting the following strange error from each of the workers when running my code on multiple workers in an HPC environment: Warning: Module Distributed with build ID … is missing from the cache. This may mean D…

---

## [Interpolate monthly time series to daily](https://discourse.julialang.org/t/interpolate-monthly-time-series-to-daily/112815)

<div class="topic-metadata">

**Author:** [@SF\_Li](https://discourse.julialang.org/u/SF_Li)\
**Replies:** 0\
**Last updated:** [April 11, 2024, 2:08am UTC](https://discourse.julialang.org/t/interpolate-monthly-time-series-to-daily/112815 "2024-04-11T02:08:39Z")

</div>

Is there a similar package in Julia to Interpolate monthly time series to daily using a mean-preserving autoregressive method dealing with raster data? I found that in R but it is very very slow! The function is int\_acm …

---

## [Reduce + hcat is type unstable](https://discourse.julialang.org/t/reduce-hcat-is-type-unstable/112800)

<div class="topic-metadata">

**Author:** [@mtanneau](https://discourse.julialang.org/u/mtanneau)\
**Replies:** 4\
**Last updated:** [April 11, 2024, 12:29am UTC](https://discourse.julialang.org/t/reduce-hcat-is-type-unstable/112800 "2024-04-11T00:29:32Z")

</div>

I have observed the following type instability when using reduce + hcat as follows (see examples below). Is this intended? Could it be related to issue#46331? More context: I am using this syntax, as recommended here., …

---

## [Documenter.jl no method matching deploy\_folder](https://discourse.julialang.org/t/documenter-jl-no-method-matching-deploy-folder/112306)

<div class="topic-metadata">

**Author:** [@irslushy](https://discourse.julialang.org/u/irslushy)\
**Replies:** 2\
**Last updated:** [April 10, 2024, 8:39pm UTC](https://discourse.julialang.org/t/documenter-jl-no-method-matching-deploy-folder/112306 "2024-04-10T20:39:46Z")

</div>

Hello - I’m working on deploying documentation for my package. The contents of my make.jl file are as follows: push!(LOAD\_PATH,"../src/") using Documenter, RadarQC makedocs(sitename="RadarQC.jl", modules= \[Rad…

---

## [Nearest Neighbor Interpolation on Matrix to Match Another's Non-Zero Structure](https://discourse.julialang.org/t/nearest-neighbor-interpolation-on-matrix-to-match-anothers-non-zero-structure/111859)

<div class="topic-metadata">

**Author:** [@vivekag7](https://discourse.julialang.org/u/vivekag7)\
**Replies:** 13\
**Last updated:** [April 10, 2024, 2:21pm UTC](https://discourse.julialang.org/t/nearest-neighbor-interpolation-on-matrix-to-match-anothers-non-zero-structure/111859 "2024-04-10T14:21:49Z")

</div>

Hello, Julia Community! I am working with two matrices: C\_values, which contains parameter values obtained from an optimization process, and V, which represents observed ice surface velocity (please see the attached ima…

---

## [BoundsError in CartesianIndices on 32-bit Windows](https://discourse.julialang.org/t/boundserror-in-cartesianindices-on-32-bit-windows/112777)

<div class="topic-metadata">

**Author:** [@Expine](https://discourse.julialang.org/u/Expine)\
**Replies:** 3\
**Last updated:** [April 10, 2024, 3:31pm UTC](https://discourse.julialang.org/t/boundserror-in-cartesianindices-on-32-bit-windows/112777 "2024-04-10T15:31:00Z")

</div>

Hi! I experienced Integer overflow on Windows due to the fact that Int32 is the default one there: length(CartesianIndices((1000000, 1000000))) Succeeds on linux64 but fails on Windows (something like A\[-72232\] is out…

---

## [How to tell Julia that my type is not iterable?](https://discourse.julialang.org/t/how-to-tell-julia-that-my-type-is-not-iterable/112767)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 2\
**Last updated:** [April 10, 2024, 12:40pm UTC](https://discourse.julialang.org/t/how-to-tell-julia-that-my-type-is-not-iterable/112767 "2024-04-10T12:40:49Z")

</div>

How do I tell Julia that my object is not iterable? How do I make a, b, c = some\_function.(mytype, (1, 2, 3)) work automatically without throwing no method matching length(::MyType)?

---

## [Best practice: Julia development under Windows?](https://discourse.julialang.org/t/best-practice-julia-development-under-windows/112711)

<div class="topic-metadata">

**Author:** [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Replies:** 10\
**Last updated:** [April 10, 2024, 7:08am UTC](https://discourse.julialang.org/t/best-practice-julia-development-under-windows/112711 "2024-04-10T07:08:09Z")

</div>

I need to buy a Laptop with a discrete graphic card for Cuda kernel development in Julia. Unfortunately, the situation with current-gen notebooks with discrete GPUs and Linux seems to be as bad as it was 10 years ago …

---

## [Storing non-isbits data in type parameters](https://discourse.julialang.org/t/storing-non-isbits-data-in-type-parameters/112748)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 1\
**Last updated:** [April 10, 2024, 2:23am UTC](https://discourse.julialang.org/t/storing-non-isbits-data-in-type-parameters/112748 "2024-04-10T02:23:28Z")

</div>

This is most likely not a new discovery, but I just realized you can effectively store non-isbits data in type parameters. MWE: julia\> struct Value{T} end julia\> Value(x) = Value{Symbol(repr(x))}(); julia\> unwrap(::Va…

---

## [Identify and add missing rows dynamically in dataframe](https://discourse.julialang.org/t/identify-and-add-missing-rows-dynamically-in-dataframe/112703)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 6\
**Last updated:** [April 9, 2024, 11:25pm UTC](https://discourse.julialang.org/t/identify-and-add-missing-rows-dynamically-in-dataframe/112703 "2024-04-09T23:25:28Z")

</div>

I have scenario where I need to insert the missing data into dataframe dynamically. 3×3 DataFrame Row │ month ac\_hrs crew\_hrs │ String Int64 Int64 ─────┼────────────────────────── 1 │ 202404 2 …

---

## [Passing all variables of an outer function to an inner function?](https://discourse.julialang.org/t/passing-all-variables-of-an-outer-function-to-an-inner-function/112726)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 9\
**Last updated:** [April 9, 2024, 3:06pm UTC](https://discourse.julialang.org/t/passing-all-variables-of-an-outer-function-to-an-inner-function/112726 "2024-04-09T15:06:11Z")

</div>

Suppose I have a function structure: function NeighborLoop!(f::Function, a,b,c,d) f(a,b,c,d) end In this case I have to double specify all the variables. Is there a smart and easy way to pass all variables from Neigh…

---

## [Work with deps with more restrictive julia compat](https://discourse.julialang.org/t/work-with-deps-with-more-restrictive-julia-compat/112510)

<div class="topic-metadata">

**Author:** [@lgoettgens](https://discourse.julialang.org/u/lgoettgens)\
**Replies:** 5\
**Last updated:** [April 9, 2024, 10:06am UTC](https://discourse.julialang.org/t/work-with-deps-with-more-restrictive-julia-compat/112510 "2024-04-09T10:06:54Z")

</div>

I am trying to make a minimal example from my real-world problem. Let’s say I have two packages PkgA and PkgB. Currently, PkgA has a julia compat of 1.0, while PkgB has a julia compat of 1.7. I now want to use some func…

---

## [InexactError in Range](https://discourse.julialang.org/t/inexacterror-in-range/112691)

<div class="topic-metadata">

**Author:** [@jdm204](https://discourse.julialang.org/u/jdm204)\
**Replies:** 2\
**Last updated:** [April 8, 2024, 8:30pm UTC](https://discourse.julialang.org/t/inexacterror-in-range/112691 "2024-04-08T20:30:08Z")

</div>

With f = -9.223372036854776e18, (f/2):0.0 gives a range of floats, while f:0.0 gives the following error: ERROR: InexactError: trunc(Int64, 9.223372036854776e18) Stacktrace: \[1\] trunc @ ./float.jl:905 \[inlined\] \[2\]…

---

## [Programming Language Benchmark 2](https://discourse.julialang.org/t/programming-language-benchmark-2/108429)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 25\
**Last updated:** [April 8, 2024, 5:30pm UTC](https://discourse.julialang.org/t/programming-language-benchmark-2/108429 "2024-04-08T17:30:11Z")

</div>

The programmer attractivechaos has created a new benchmark comparing different programming languages, hosted at GitHub - attractivechaos/plb2: A programming language benchmark. It’s a quite nice benchmark, being small en…

---

## [Weave not working for latex](https://discourse.julialang.org/t/weave-not-working-for-latex/112643)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 12\
**Last updated:** [April 8, 2024, 4:38pm UTC](https://discourse.julialang.org/t/weave-not-working-for-latex/112643 "2024-04-08T16:38:41Z")

</div>

I am new to Weave.jl and I am having trouble with the latex rendering. I have xelatex installed and can get it to render for simple latex equation, but when I try to use it for expressions that start with \\begin{align} I…

---

## [Plots.jl and CairoMakie not precompiling](https://discourse.julialang.org/t/plots-jl-and-cairomakie-not-precompiling/112538)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 10\
**Last updated:** [April 8, 2024, 4:16pm UTC](https://discourse.julialang.org/t/plots-jl-and-cairomakie-not-precompiling/112538 "2024-04-08T16:16:33Z")

</div>

I can’t seem to get Pluto or CairoMakie to precompile, and I am not sure why. This is on a company computer so I am not sure if this is related to any firewall? Other packages seem to precompile fine. Has anyone had an …

---

## [Julia + Docker + AWS DevOps Workflow](https://discourse.julialang.org/t/julia-docker-aws-devops-workflow/109459)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 2\
**Last updated:** [April 8, 2024, 3:56pm UTC](https://discourse.julialang.org/t/julia-docker-aws-devops-workflow/109459 "2024-04-08T15:56:52Z")

</div>

I have a task, written in Julia, that I manage using Fargate. My current workflow is: Write some code in my project directory Deploy using Serverless to wrap up a Docker container and push to ECS Kick of the task from …

---

## [How to declare sharedarray in local scope](https://discourse.julialang.org/t/how-to-declare-sharedarray-in-local-scope/112683)

<div class="topic-metadata">

**Author:** [@TongTongYee](https://discourse.julialang.org/u/TongTongYee)\
**Replies:** 0\
**Last updated:** [April 8, 2024, 1:49pm UTC](https://discourse.julialang.org/t/how-to-declare-sharedarray-in-local-scope/112683 "2024-04-08T13:49:34Z")

</div>

Hi! I want to use sharedArray without data movement. So I write the following code. using Distributed addprocs(1) A = SharedArray{ComplexF64,1}(fill(1,(10))); @everywhere 2 A But this code makes the error, ERROR: On…

---

## [Two conditions in a while -\> ERROR: TypeError: non-boolean (BitMatrix) used in boolean context](https://discourse.julialang.org/t/two-conditions-in-a-while-error-typeerror-non-boolean-bitmatrix-used-in-boolean-context/112564)

<div class="topic-metadata">

**Author:** [@Stefani](https://discourse.julialang.org/u/Stefani)\
**Replies:** 5\
**Last updated:** [April 8, 2024, 10:41am UTC](https://discourse.julialang.org/t/two-conditions-in-a-while-error-typeerror-non-boolean-bitmatrix-used-in-boolean-context/112564 "2024-04-08T10:41:19Z")

</div>

Hallo, I am new to Julia and this is the first time I ever ask for help in a forum, so please let me know if I can improve my post. My problem: Let dR and dW be functions from R^2 → R^{n \\times n}. There exists a pai…

---

## [The DFBDF solver is great; how can I learn more about it?](https://discourse.julialang.org/t/the-dfbdf-solver-is-great-how-can-i-learn-more-about-it/112487)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [April 8, 2024, 9:12am UTC](https://discourse.julialang.org/t/the-dfbdf-solver-is-great-how-can-i-learn-more-about-it/112487 "2024-04-08T09:12:12Z")

</div>

I love the DFBDF solver for implicit differential equations, 2 to 4 times faster than IDA from Sundials for my problem and using only half of the memory… And very stable. Is there any scientific paper about it? And whe…

---

## [Adding a local module](https://discourse.julialang.org/t/adding-a-local-module/112658)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 6\
**Last updated:** [April 8, 2024, 6:01am UTC](https://discourse.julialang.org/t/adding-a-local-module/112658 "2024-04-08T06:01:41Z")

</div>

I am trying to run some open code from github The package is not a registered one, so it is suggested to add the package from the local path. I have downloaded the package to my C disk, but cannot add it successfully, …

---

## [What's the current (spring 2024) canonical approach to data science in Julia?](https://discourse.julialang.org/t/whats-the-current-spring-2024-canonical-approach-to-data-science-in-julia/112427)

<div class="topic-metadata">

**Author:** [@elenev](https://discourse.julialang.org/u/elenev)\
**Replies:** 34\
**Last updated:** [April 8, 2024, 4:30am UTC](https://discourse.julialang.org/t/whats-the-current-spring-2024-canonical-approach-to-data-science-in-julia/112427 "2024-04-08T04:30:59Z")

</div>

I have been using Julia for building, solving, and simulating computational models for a few years now, but my empirical (“data science”) work has remained in legacy languages – Python for data wrangling and plotting, St…

---

## [\`public\` cannot be used when quoting](https://discourse.julialang.org/t/public-cannot-be-used-when-quoting/112657)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 1\
**Last updated:** [April 8, 2024, 1:23am UTC](https://discourse.julialang.org/t/public-cannot-be-used-when-quoting/112657 "2024-04-08T01:23:41Z")

</div>

To create an expression involving the new “keyword” public of Julia 1.11, one can say something like julia\> Expr(:public, :x) :(public x) The following does not work, however: julia\> :(public x) ERROR: ParseError: # E…

---

## [Downgrade CI fails with "persistent task" Aqua error](https://discourse.julialang.org/t/downgrade-ci-fails-with-persistent-task-aqua-error/112644)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 4\
**Last updated:** [April 7, 2024, 9:42pm UTC](https://discourse.julialang.org/t/downgrade-ci-fails-with-persistent-task-aqua-error/112644 "2024-04-07T21:42:04Z")

</div>

The CellListMap.jl package Downgrade CI is failing with the error below. Can some provide any clue on how to find what is going wrong? I’m not sure what the persistent\_task erorr is exactly, and less why it could appear…

---

## [Debugging saving error from tagsave DrWatson.jl](https://discourse.julialang.org/t/debugging-saving-error-from-tagsave-drwatson-jl/57301)

<div class="topic-metadata">

**Author:** [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Replies:** 0\
**Last updated:** [March 16, 2021, 1:30pm UTC](https://discourse.julialang.org/t/debugging-saving-error-from-tagsave-drwatson-jl/57301 "2021-03-16T13:30:06Z")

</div>

Hi, I’m having trouble understanding an error happening when running a script. It is part of a larger project, therefore it’s kinda hard to add an example. But what happens is that I run a model, train it and try to save…

---

## [Continue solving ODE problem when using NeuralPDE.NNODE](https://discourse.julialang.org/t/continue-solving-ode-problem-when-using-neuralpde-nnode/101580)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 2\
**Last updated:** [April 7, 2024, 5:12pm UTC](https://discourse.julialang.org/t/continue-solving-ode-problem-when-using-neuralpde-nnode/101580 "2024-04-07T17:12:27Z")

</div>

I tried to continue solving by using the previous weight as the initial weight for the new one. But the loss for the first iteration of the new one is higher than the final loss of the previous one. My code is below: u…

---

## [Sorting a StructArray variable faster and how to update values?](https://discourse.julialang.org/t/sorting-a-structarray-variable-faster-and-how-to-update-values/112621)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 6\
**Last updated:** [April 7, 2024, 1:06pm UTC](https://discourse.julialang.org/t/sorting-a-structarray-variable-faster-and-how-to-update-values/112621 "2024-04-07T13:06:16Z")

</div>

Hello! I have a runnable MWE here, put into a small module to easily redefine struct as needed: module ParticleSorting export sort\_particles\_by\_density using StructArrays using StaticArrays using BenchmarkTools using…

---

## [How to evaluate multivariate log normal distribution at arbitrary point?](https://discourse.julialang.org/t/how-to-evaluate-multivariate-log-normal-distribution-at-arbitrary-point/112608)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 2\
**Last updated:** [April 7, 2024, 9:46am UTC](https://discourse.julialang.org/t/how-to-evaluate-multivariate-log-normal-distribution-at-arbitrary-point/112608 "2024-04-07T09:46:47Z")

</div>

Suppose I have the following distribution over two variables dist = MvLogNormal(mean\_a\_b, cov\_a\_b) Suppose h is an array of dimension 1000\\times 2. For each row of array h, the first entry represents the rank of the …

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

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