# General Usage

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

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

**Page:** 473

---

## [Method Error : Not identifying Integer as Any](https://discourse.julialang.org/t/method-error-not-identifying-integer-as-any/77957)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 3\
**Last updated:** [March 16, 2022, 12:39pm UTC](https://discourse.julialang.org/t/method-error-not-identifying-integer-as-any/77957 "2022-03-16T12:39:01Z")

</div>

Hi, I have function update\_agent\_attributes that accepts a Dict{Symbol, Any} as one of the arguments. However when I pass a Dict{Symbol, Interger} I get an Method Error. Any idea why ? mutable struct Casualty id :: …

---

## [Define mul! for DiffEqArrayOperator](https://discourse.julialang.org/t/define-mul-for-diffeqarrayoperator/77911)

<div class="topic-metadata">

**Author:** [@Elyco](https://discourse.julialang.org/u/Elyco)\
**Replies:** 4\
**Last updated:** [March 16, 2022, 11:27am UTC](https://discourse.julialang.org/t/define-mul-for-diffeqarrayoperator/77911 "2022-03-16T11:27:17Z")

</div>

Hi, I’m trying to use the SplitODEProblem interface in order to improve the performance of my differential equation solver. The problem has a linear part which can sum into matrix multiplication, and a non linear part. …

---

## [Is any way to print DataFrames using heat maps as background?](https://discourse.julialang.org/t/is-any-way-to-print-dataframes-using-heat-maps-as-background/77744)

<div class="topic-metadata">

**Author:** [@Dan\_Micsa](https://discourse.julialang.org/u/Dan_Micsa)\
**Replies:** 45\
**Last updated:** [March 16, 2022, 9:16am UTC](https://discourse.julialang.org/t/is-any-way-to-print-dataframes-using-heat-maps-as-background/77744 "2022-03-16T09:16:44Z")

</div>

I want to print in various notebooks dataframes setting the background of each cell. This is possible in Python. Here is an example using a heatmap. Something that looks like: Is some library or code out there to do …

---

## [Serializing a tree requires a huge amount of storage](https://discourse.julialang.org/t/serializing-a-tree-requires-a-huge-amount-of-storage/77934)

<div class="topic-metadata">

**Author:** [@1115](https://discourse.julialang.org/u/1115)\
**Replies:** 12\
**Last updated:** [March 16, 2022, 9:59am UTC](https://discourse.julialang.org/t/serializing-a-tree-requires-a-huge-amount-of-storage/77934 "2022-03-16T09:59:06Z")

</div>

This is the code I used for testing julia\> struct Tree left::Tree right::Tree Tree() = new() Tree(l, r) = new(l, r) end julia\> a = Tree() Tree(#undef, #undef) julia\> …

---

## [Basic julia syntax](https://discourse.julialang.org/t/basic-julia-syntax/77955)

<div class="topic-metadata">

**Author:** [@iAnkiit](https://discourse.julialang.org/u/iAnkiit)\
**Replies:** 3\
**Last updated:** [March 16, 2022, 9:54am UTC](https://discourse.julialang.org/t/basic-julia-syntax/77955 "2022-03-16T09:54:08Z")

</div>

I have a function function inputs(setup::Dict, path::AbstractString) What actually setup meaning here ? Is it like input::Dict ?

---

## [Inserting a row or column in a Makie layout](https://discourse.julialang.org/t/inserting-a-row-or-column-in-a-makie-layout/77910)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 5\
**Last updated:** [March 16, 2022, 7:17am UTC](https://discourse.julialang.org/t/inserting-a-row-or-column-in-a-makie-layout/77910 "2022-03-16T07:17:51Z")

</div>

Say I have an existing grid like this one: using CairoMakie f = Figure(resolution=(600, 200)) scatter(f\[1,1\], 1:3, 1:3) scatter(f\[1,2\], 1:3, \[0,0,0\]) f How can I insert a column between these two? An idea would be …

---

## [Why is the splat operator slow?](https://discourse.julialang.org/t/why-is-the-splat-operator-slow/77928)

<div class="topic-metadata">

**Author:** [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Replies:** 3\
**Last updated:** [March 15, 2022, 9:50pm UTC](https://discourse.julialang.org/t/why-is-the-splat-operator-slow/77928 "2022-03-15T21:50:34Z")

</div>

I was doing some benchmarks and got these results: julia\> using BenchmarkTools julia\> f1(itr) = collect(itr) f1 (generic function with 1 method) julia\> f2(itr) = \[itr...\] f2 (generic function with 1 method) julia\> ge…

---

## [Is there a way to write a function into JLD or other h5 file?](https://discourse.julialang.org/t/is-there-a-way-to-write-a-function-into-jld-or-other-h5-file/77718)

<div class="topic-metadata">

**Author:** [@vavrines](https://discourse.julialang.org/u/vavrines)\
**Replies:** 8\
**Last updated:** [March 15, 2022, 7:23pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-write-a-function-into-jld-or-other-h5-file/77718 "2022-03-15T19:23:37Z")

</div>

Wondering if there is a way to write a defined function into file. A MWE is using JLD2 f(x) = x^2 @save "f.jld2" f For this case, if I close the current session and execute the following code using JLD2 @load "f.jld2…

---

## [getindex(A::AbstractArray, I...) slows down computations with array of type Array{Float64,2}](https://discourse.julialang.org/t/getindex-a-abstractarray-i-slows-down-computations-with-array-of-type-array-float64-2/77927)

<div class="topic-metadata">

**Author:** [@Geometh](https://discourse.julialang.org/u/Geometh)\
**Replies:** 2\
**Last updated:** [March 15, 2022, 8:33pm UTC](https://discourse.julialang.org/t/getindex-a-abstractarray-i-slows-down-computations-with-array-of-type-array-float64-2/77927 "2022-03-15T20:33:28Z")

</div>

Hi there, while optimizing some code of mine I run into sum behavior that I don’t fully understand. I have an array of point coordinates, which I need to access. I stored the coordinates in column-major order as it is …

---

## [Building libjulia-debug.dll for debug but no symbols loaded for DLL](https://discourse.julialang.org/t/building-libjulia-debug-dll-for-debug-but-no-symbols-loaded-for-dll/77925)

<div class="topic-metadata">

**Author:** [@Jon\_Barker](https://discourse.julialang.org/u/Jon_Barker)\
**Replies:** 0\
**Last updated:** [March 15, 2022, 8:02pm UTC](https://discourse.julialang.org/t/building-libjulia-debug-dll-for-debug-but-no-symbols-loaded-for-dll/77925 "2022-03-15T20:02:14Z")

</div>

I’m building julia in debug mode (make debug -j 8) however when attaching to the process, it says there are no symbols. What am I doing wrong? Is it not possible to debug with visual studio and I need to use GDB or s…

---

## [Wrapping a C library | Where to start?](https://discourse.julialang.org/t/wrapping-a-c-library-where-to-start/71658)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 6\
**Last updated:** [March 15, 2022, 4:46pm UTC](https://discourse.julialang.org/t/wrapping-a-c-library-where-to-start/71658 "2022-03-15T16:46:41Z")

</div>

Hi! I want to use a few functions of a dll file from Julia and I want to wrap them in a package. The dlls I want to use are for talking to some motion controllers (The dlls in question can be found on thorlabs.com. Ther…

---

## [Slower summation of a series in Julia than in Python](https://discourse.julialang.org/t/slower-summation-of-a-series-in-julia-than-in-python/77912)

<div class="topic-metadata">

**Author:** [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Replies:** 10\
**Last updated:** [March 15, 2022, 4:44pm UTC](https://discourse.julialang.org/t/slower-summation-of-a-series-in-julia-than-in-python/77912 "2022-03-15T16:44:06Z")

</div>

Hello, I was doing some tests in Julia and Python and I found that the following code was much slower in Julia and I do not see why this would be the case harmonic(k) = (-1)^k / (k + 1) function sₙ(an, n) S = 0.0 …

---

## [Attempting to compile J1.4 - error 404 when downloading packages?](https://discourse.julialang.org/t/attempting-to-compile-j1-4-error-404-when-downloading-packages/77918)

<div class="topic-metadata">

**Author:** [@Jon\_Barker](https://discourse.julialang.org/u/Jon_Barker)\
**Replies:** 1\
**Last updated:** [March 15, 2022, 2:58pm UTC](https://discourse.julialang.org/t/attempting-to-compile-j1-4-error-404-when-downloading-packages/77918 "2022-03-15T14:58:33Z")

</div>

I’ve setup cgywin64, with the packages described here: https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/build/windows.md Done a git clone --branch release-1.4 https://github.com/JuliaLang/julia.git Run ec…

---

## [Error on installation packages](https://discourse.julialang.org/t/error-on-installation-packages/77914)

<div class="topic-metadata">

**Author:** [@Photonico](https://discourse.julialang.org/u/Photonico)\
**Replies:** 8\
**Last updated:** [March 15, 2022, 2:44pm UTC](https://discourse.julialang.org/t/error-on-installation-packages/77914 "2022-03-15T14:44:13Z")

</div>

Hi, I cannot install new packages with error: curl\_multi\_socket\_action: 8 @ Downloads.Curl /home/abuild/rpmbuild/BUILD/julia-1.6.3/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36 It’s bothering me. How can …

---

## [RemoteChannel for multiple-producer multiple-consumer](https://discourse.julialang.org/t/remotechannel-for-multiple-producer-multiple-consumer/41366)

<div class="topic-metadata">

**Author:** [@orenbenkiki](https://discourse.julialang.org/u/orenbenkiki)\
**Replies:** 3\
**Last updated:** [March 15, 2022, 1:07pm UTC](https://discourse.julialang.org/t/remotechannel-for-multiple-producer-multiple-consumer/41366 "2022-03-15T13:07:52Z")

</div>

Suppose I have multiple processes writing into a single RemoteChannel, and multiple processes reading from it. Is that an expected “reasonable” use of a RemoteChannel? If not, is there a better approach? If yes, is it…

---

## [Gnuplot from VSCode: no plot](https://discourse.julialang.org/t/gnuplot-from-vscode-no-plot/65458)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [March 15, 2022, 9:00am UTC](https://discourse.julialang.org/t/gnuplot-from-vscode-no-plot/65458 "2022-03-15T09:00:57Z")

</div>

When I run gnuplot from within vscode, I get nothing: no error, but no plot either. Running gnuplot from the shell works fine. This works: shell\> gnuplot G N U P L O T Version 5.2 patchlevel 8 last …

---

## [What exactly Flux.destructure does?](https://discourse.julialang.org/t/what-exactly-flux-destructure-does/77402)

<div class="topic-metadata">

**Author:** [@Avec](https://discourse.julialang.org/u/Avec)\
**Replies:** 6\
**Last updated:** [March 15, 2022, 8:52am UTC](https://discourse.julialang.org/t/what-exactly-flux-destructure-does/77402 "2022-03-15T08:52:19Z")

</div>

Hi all, I built a custom nn model UnetSkipGenerator, trained it and needed to save the results, therefore I used Flux.destructure and saved the parameters it returned. Now I am trying to do some computations with them, …

---

## [ODE.jl: PolyCompat not defined](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332)

<div class="topic-metadata">

**Author:** [@Caio\_Machado](https://discourse.julialang.org/u/Caio_Machado)\
**Replies:** 4\
**Last updated:** [March 15, 2022, 8:31am UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332 "2022-03-15T08:31:01Z")

</div>

Hi all, I am trying to run ODE.jl in Julia 1.5, but I get the following error when loading the package. I have installed Polynomials using Pkg.add(). I know there are better solvers available in DifferentialEquations.jl…

---

## [Can NODE be compatible well with Boundary Value Problems?](https://discourse.julialang.org/t/can-node-be-compatible-well-with-boundary-value-problems/77902)

<div class="topic-metadata">

**Author:** [@YukunYan](https://discourse.julialang.org/u/YukunYan)\
**Replies:** 0\
**Last updated:** [March 15, 2022, 6:58am UTC](https://discourse.julialang.org/t/can-node-be-compatible-well-with-boundary-value-problems/77902 "2022-03-15T06:58:22Z")

</div>

Recently, I have tried to use NODE in BVP to learn the parameter(the code is below). I have found that “DiffEqFlux.sciml\_train” is ok to train while there will be a warning that AD methods failed, using numerical differe…

---

## [Performance of array of arrays vs. dictionaries when accessing and manipulating data structures](https://discourse.julialang.org/t/performance-of-array-of-arrays-vs-dictionaries-when-accessing-and-manipulating-data-structures/77860)

<div class="topic-metadata">

**Author:** [@Christian\_Brunbjerg](https://discourse.julialang.org/u/Christian_Brunbjerg)\
**Replies:** 5\
**Last updated:** [March 14, 2022, 9:36pm UTC](https://discourse.julialang.org/t/performance-of-array-of-arrays-vs-dictionaries-when-accessing-and-manipulating-data-structures/77860 "2022-03-14T21:36:12Z")

</div>

I here have two different structs that represent the same data. The main objective is to achieve as fast as possible performance. #Using array of arrays representation struct Route\_array Station::Vector{Int64} T…

---

## [How to best handle these exceptions in FOC of maximization?](https://discourse.julialang.org/t/how-to-best-handle-these-exceptions-in-foc-of-maximization/77575)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 1\
**Last updated:** [March 14, 2022, 10:03pm UTC](https://discourse.julialang.org/t/how-to-best-handle-these-exceptions-in-foc-of-maximization/77575 "2022-03-14T22:03:19Z")

</div>

I’m trying to maximize a function f(t\_1, t\_2) for which the first order conditions yield 2 equations depending on some conditions. The FOCs divide the plane into 3 regions, where t\_1 \> t\_2, where t\_1 \< t\_2, and where t\_1…

---

## [How to build a Poincaré section for a 6th order system?](https://discourse.julialang.org/t/how-to-build-a-poincare-section-for-a-6th-order-system/77694)

<div class="topic-metadata">

**Author:** [@egor](https://discourse.julialang.org/u/egor)\
**Replies:** 6\
**Last updated:** [March 14, 2022, 7:42pm UTC](https://discourse.julialang.org/t/how-to-build-a-poincare-section-for-a-6th-order-system/77694 "2022-03-14T19:42:20Z")

</div>

Hello everyone, I want to plot the Poincaré section for the system: Following the example of this tutorial, I wrote the following code: plane = (3, 0.0) fig = Figure(resolution = (600,300)) axx = Axis(fig\[1,1\]; xla…

---

## [How to implement custom weight initialization in Flux?](https://discourse.julialang.org/t/how-to-implement-custom-weight-initialization-in-flux/77876)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 1\
**Last updated:** [March 14, 2022, 5:15pm UTC](https://discourse.julialang.org/t/how-to-implement-custom-weight-initialization-in-flux/77876 "2022-03-14T17:15:21Z")

</div>

How could I define custom weight initialization in Flux? The solution should be clean. Documentation is confusing. Should I define the Dense layer from scratch?

---

## [Function call on STDOUT](https://discourse.julialang.org/t/function-call-on-stdout/77858)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 12\
**Last updated:** [March 14, 2022, 5:05pm UTC](https://discourse.julialang.org/t/function-call-on-stdout/77858 "2022-03-14T17:05:08Z")

</div>

Hello everyone. Let me describe my situation. In Term I’m working on a progress bar feature. It looks like this: The way the bar display is updated is by using ANSI codes to erase the last line printed out in the …

---

## [A parametric-type related crash on Julia 1.7+](https://discourse.julialang.org/t/a-parametric-type-related-crash-on-julia-1-7/77844)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 3\
**Last updated:** [March 14, 2022, 4:49pm UTC](https://discourse.julialang.org/t/a-parametric-type-related-crash-on-julia-1-7/77844 "2022-03-14T16:49:37Z")

</div>

I discovered a very strange crash scenario while developing my package. It seems to only happen on Julia 1.7+. For example, 1.6 runs perfectly well. It took me some time to create this “MWE” from my code base and I hope …

---

## [Dealing with non-positive definite matrices in Cholesky decomposition: R vs. Julia](https://discourse.julialang.org/t/dealing-with-non-positive-definite-matrices-in-cholesky-decomposition-r-vs-julia/77869)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 4\
**Last updated:** [March 14, 2022, 4:10pm UTC](https://discourse.julialang.org/t/dealing-with-non-positive-definite-matrices-in-cholesky-decomposition-r-vs-julia/77869 "2022-03-14T16:10:56Z")

</div>

Hi all, While porting some R code into Julia, I have encountered many cases where cholesky in Julia returns an error because the matrix is not positive definite. However, in R, I do not run into these cases. I was wonde…

---

## [Does locally compiled Julia emit faster code?](https://discourse.julialang.org/t/does-locally-compiled-julia-emit-faster-code/77838)

<div class="topic-metadata">

**Author:** [@Lewis\_Hein](https://discourse.julialang.org/u/Lewis_Hein)\
**Replies:** 1\
**Last updated:** [March 14, 2022, 3:06pm UTC](https://discourse.julialang.org/t/does-locally-compiled-julia-emit-faster-code/77838 "2022-03-14T15:06:27Z")

</div>

I’m working on a reasonably high-end platform (Intel Xeon E5). Will a generic binary of julia be able to leverage all the various optimizations of this CPU when compiling Julia code? Or do I need to compile from source l…

---

## [Can we change the Julia help from bottom-up to top-down?](https://discourse.julialang.org/t/can-we-change-the-julia-help-from-bottom-up-to-top-down/77866)

<div class="topic-metadata">

**Author:** [@ZdM87](https://discourse.julialang.org/u/ZdM87)\
**Replies:** 7\
**Last updated:** [March 14, 2022, 2:47pm UTC](https://discourse.julialang.org/t/can-we-change-the-julia-help-from-bottom-up-to-top-down/77866 "2022-03-14T14:47:56Z")

</div>

When you type ? in Julia and then type \<something\>, you get all the help information about \<something\> but if this information does not fit in the screen, you will get the tail of the information (like in a bottom-up vie…

---

## [How to get the state of a dynamic system from lyapunovspectrum?](https://discourse.julialang.org/t/how-to-get-the-state-of-a-dynamic-system-from-lyapunovspectrum/77863)

<div class="topic-metadata">

**Author:** [@egor](https://discourse.julialang.org/u/egor)\
**Replies:** 0\
**Last updated:** [March 14, 2022, 12:26pm UTC](https://discourse.julialang.org/t/how-to-get-the-state-of-a-dynamic-system-from-lyapunovspectrum/77863 "2022-03-14T12:26:54Z")

</div>

Hello everyone, I am writing a code for calculating the Lyapunov indicators of the system: ks = 0.0:0.0001:1.0; λs = zeros(length(ks), 6) for (i, k) in enumerate(ks) set\_parameter!(ds, 14, k) λs\[i, :\] .= lyapuno…

---

## [Error GC failed post updating environment](https://discourse.julialang.org/t/error-gc-failed-post-updating-environment/77817)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [March 14, 2022, 10:42am UTC](https://discourse.julialang.org/t/error-gc-failed-post-updating-environment/77817 "2022-03-14T10:42:36Z")

</div>

error GC failed post updating environment(local environment as well as main julia environments) how do i fix this ? Precompiling project... 46 dependencies successfully precompiled in 650 seconds (332 already precomp…

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

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