# General Usage

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

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

**Page:** 193

---

## [Problems with function \`diff()\`: objects of type Int64 are not callable](https://discourse.julialang.org/t/problems-with-function-diff-objects-of-type-int64-are-not-callable/111161)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 3\
**Last updated:** [March 4, 2024, 11:30pm UTC](https://discourse.julialang.org/t/problems-with-function-diff-objects-of-type-int64-are-not-callable/111161 "2024-03-04T23:30:17Z")

</div>

I am currently working on a series of predictive tests and decided to write a script, Script A, to gather a series of different models in one place. This makes the process faster and facilitates the comparison of results…

---

## [CSV won't read tab separated file](https://discourse.julialang.org/t/csv-wont-read-tab-separated-file/111120)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 23\
**Last updated:** [March 4, 2024, 6:06pm UTC](https://discourse.julialang.org/t/csv-wont-read-tab-separated-file/111120 "2024-03-04T18:06:09Z")

</div>

I have a large text file that describes itself as -- -- PostgreSQL database dump -- -- Dumped from database version 12.16 -- Dumped by pg\_dump version 12.16 It contains several blocks of tab-separated data which repre…

---

## [Lux recurrent networks like LSTM - why are hidden state and memory not part of the model state \`st\`?](https://discourse.julialang.org/t/lux-recurrent-networks-like-lstm-why-are-hidden-state-and-memory-not-part-of-the-model-state-st/110877)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [March 4, 2024, 9:54pm UTC](https://discourse.julialang.org/t/lux-recurrent-networks-like-lstm-why-are-hidden-state-and-memory-not-part-of-the-model-state-st/110877 "2024-03-04T21:54:59Z")

</div>

Lux.jl is special in that it has the extra st state variable which it distinguishes from the output and the other fixed parameters ps. Hence I am currently confused about the implementation of LSTM function initialsta…

---

## [Using XLSX.jl to save DataFrames to multiple sheets](https://discourse.julialang.org/t/using-xlsx-jl-to-save-dataframes-to-multiple-sheets/69379)

<div class="topic-metadata">

**Author:** [@JackC](https://discourse.julialang.org/u/JackC)\
**Replies:** 4\
**Last updated:** [March 4, 2024, 5:40pm UTC](https://discourse.julialang.org/t/using-xlsx-jl-to-save-dataframes-to-multiple-sheets/69379 "2024-03-04T17:40:44Z")

</div>

I’ve been using XLSX.jl to save dataframes to an Excel workbook. I would like to save each DataFrame to a different sheet in the workbook. The documentation gives an example of such a case that works: df1 = DataFrames.D…

---

## [GitError when adding package via LocalRegistry](https://discourse.julialang.org/t/giterror-when-adding-package-via-localregistry/111125)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 9\
**Last updated:** [March 4, 2024, 5:13pm UTC](https://discourse.julialang.org/t/giterror-when-adding-package-via-localregistry/111125 "2024-03-04T17:13:08Z")

</div>

Hello, I am using LocalRegistry to maintain a private package. It was working well until today when I recieved an error after trying to add a private package to my project via \] add MyPackage. Here is the error I recei…

---

## [Is @distributed using local threads to further distribute?](https://discourse.julialang.org/t/is-distributed-using-local-threads-to-further-distribute/111130)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [March 4, 2024, 3:39pm UTC](https://discourse.julialang.org/t/is-distributed-using-local-threads-to-further-distribute/111130 "2024-03-04T15:39:05Z")

</div>

I am looking for a @distributed reducer for ... version which simply parallelizes the function as large as possible. I.e. using both available machines and available threads. Is @distributed already doing so? if not, i…

---

## [Question on TaskLocalValue](https://discourse.julialang.org/t/question-on-tasklocalvalue/110658)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 10\
**Last updated:** [March 4, 2024, 3:18pm UTC](https://discourse.julialang.org/t/question-on-tasklocalvalue/110658 "2024-03-04T15:18:10Z")

</div>

Continuing the discussion from Inconsistent CPU utilisation in @threads loops: I understand that trying to establish thread-based storage is an invitation to disaster, but on the other hand, when there are many more …

---

## [Using Enzyme with LinearSolve, scary errors!](https://discourse.julialang.org/t/using-enzyme-with-linearsolve-scary-errors/110250)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 10\
**Last updated:** [March 4, 2024, 3:13pm UTC](https://discourse.julialang.org/t/using-enzyme-with-linearsolve-scary-errors/110250 "2024-03-04T15:13:26Z")

</div>

I have a MWE of using Enzyme with linearsolve that fails, giving first a warning about using a BLAS fallback (which gets shoved out of my terminal by what follows), then a huge amount of Enzyme TypeAnalysisDepthLimit war…

---

## [Plotting slow](https://discourse.julialang.org/t/plotting-slow/111083)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 6\
**Last updated:** [March 4, 2024, 12:57pm UTC](https://discourse.julialang.org/t/plotting-slow/111083 "2024-03-04T12:57:43Z")

</div>

We are currently working on a simulation and the bottleneck is plotting. We are plotting a grid of dimension 1000 x 2000 and saving it. T\_c\_hm = heatmap(x, y, transpose(T\_c\_renh), size = (1000, 400), clim=(0, 0.3)) …

---

## [Package to evaluate oscillating integrals with increasing frequency](https://discourse.julialang.org/t/package-to-evaluate-oscillating-integrals-with-increasing-frequency/108565)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 14\
**Last updated:** [March 4, 2024, 9:34am UTC](https://discourse.julialang.org/t/package-to-evaluate-oscillating-integrals-with-increasing-frequency/108565 "2024-03-04T09:34:12Z")

</div>

I’m looking to numerically integrate a function of the form int\[g(x)\*sin(r(x)\*x) dx, x=a...infinity\] Where g(x) is exponentially decaying and the frequency r(x) = A+B\*sqrt(1+x^2) is increasing with x. I saw GitHub - x…

---

## [Determinant of an integer matrix is float](https://discourse.julialang.org/t/determinant-of-an-integer-matrix-is-float/111107)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 4\
**Last updated:** [March 4, 2024, 4:42am UTC](https://discourse.julialang.org/t/determinant-of-an-integer-matrix-is-float/111107 "2024-03-04T04:42:13Z")

</div>

Why isn’t it an int? julia\> a, c, b, d = M = \[10 20; 30 40\]; a\*d - b\*c , det(M) (-200, -200.00000000000003)

---

## [Makie axis limits aren't set if infinite values present](https://discourse.julialang.org/t/makie-axis-limits-arent-set-if-infinite-values-present/111114)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 0\
**Last updated:** [March 4, 2024, 4:27am UTC](https://discourse.julialang.org/t/makie-axis-limits-arent-set-if-infinite-values-present/111114 "2024-03-04T04:27:23Z")

</div>

The y values include some -Infs and it looks like that makes the axis limits give up. Is that expected behavior? scatter(1:1000, \[log(10^k) for k in -1.0:-1:-1000\])

---

## [Keywords using and import: are they really needed both?](https://discourse.julialang.org/t/keywords-using-and-import-are-they-really-needed-both/111104)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [March 4, 2024, 1:08am UTC](https://discourse.julialang.org/t/keywords-using-and-import-are-they-really-needed-both/111104 "2024-03-04T01:08:25Z")

</div>

A longish discussion has been going back and forth what to do about these two keywords. Consider the following code: module Foo export nice, DOG struct Dog end # singleton type, not exported const DOG = Dog() #…

---

## [Makie realtime plot draws line from start datapoint after some time - BUG](https://discourse.julialang.org/t/makie-realtime-plot-draws-line-from-start-datapoint-after-some-time-bug/111111)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 0\
**Last updated:** [March 3, 2024, 11:47pm UTC](https://discourse.julialang.org/t/makie-realtime-plot-draws-line-from-start-datapoint-after-some-time-bug/111111 "2024-03-03T23:47:17Z")

</div>

This is code for a realtime updating Makie line plot. It is setup to let you pan the chart on click. If you let it proceed to about +3 days from the start data point it draws a straight line from the first data point t…

---

## [\`mergewith\` issue with \`Unitful\`](https://discourse.julialang.org/t/mergewith-issue-with-unitful/111087)

<div class="topic-metadata">

**Author:** [@mlhetland](https://discourse.julialang.org/u/mlhetland)\
**Replies:** 9\
**Last updated:** [March 3, 2024, 11:28pm UTC](https://discourse.julialang.org/t/mergewith-issue-with-unitful/111087 "2024-03-03T23:28:07Z")

</div>

I’ve been using mergewith(+, …) with Dicts containing Unitful values, and it worked great for a while … until it suddenly didn’t. And slight reorganization of the arguments made it work again, so I’m not quite sure what’…

---

## [Julia code not being auto-indented .jmd files using Weave.jl in VSCODE](https://discourse.julialang.org/t/julia-code-not-being-auto-indented-jmd-files-using-weave-jl-in-vscode/111098)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 0\
**Last updated:** [March 3, 2024, 4:39pm UTC](https://discourse.julialang.org/t/julia-code-not-being-auto-indented-jmd-files-using-weave-jl-in-vscode/111098 "2024-03-03T16:39:38Z")

</div>

Dear All, I am using the package Weave.jl in VSCODE (filetype: .jmd). When I write julia code within the julia code block \`\`\`julia \`\`\` the code is not indented properly, e.g., if I start a for loop, the code looks li…

---

## [Module scope and distributed computing](https://discourse.julialang.org/t/module-scope-and-distributed-computing/111014)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 2\
**Last updated:** [March 3, 2024, 3:49pm UTC](https://discourse.julialang.org/t/module-scope-and-distributed-computing/111014 "2024-03-03T15:49:13Z")

</div>

I have a rather extensive and inaccessible algorithm that deploys distributed computing. To make it more accessible, I want to wrap as much of the algorithm into the functions of my package. I manage to initialize my va…

---

## [Mutating a view (not the underlying array)](https://discourse.julialang.org/t/mutating-a-view-not-the-underlying-array/111089)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 0\
**Last updated:** [March 3, 2024, 11:58am UTC](https://discourse.julialang.org/t/mutating-a-view-not-the-underlying-array/111089 "2024-03-03T11:58:05Z")

</div>

I have a question about views. I have a vector P::Vector in which I want to find a subset with a specific property. This can be done incrementally. I use a loop like this: idxs = collect(eachindex(P)) Psubset = view(P,…

---

## [Debounce notfication of an Observable](https://discourse.julialang.org/t/debounce-notfication-of-an-observable/111079)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 3\
**Last updated:** [March 3, 2024, 8:46am UTC](https://discourse.julialang.org/t/debounce-notfication-of-an-observable/111079 "2024-03-03T08:46:45Z")

</div>

Is there a simple way to debounce a function call like in js’ Lodash? I want to notfiy an Observable at most once every 0.25s. This is useful for performance reasons in Makie. obs = Observable(1) notify(obs, debounce=…

---

## [Is matrix multiplication multi-threaded for Double64?](https://discourse.julialang.org/t/is-matrix-multiplication-multi-threaded-for-double64/111081)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 4\
**Last updated:** [March 3, 2024, 5:01am UTC](https://discourse.julialang.org/t/is-matrix-multiplication-multi-threaded-for-double64/111081 "2024-03-03T05:01:22Z")

</div>

I tested multiplication of two Double64 matrices and saw no effects on performance by using BLAS.set\_num\_threads(n).

---

## [Efficient approach to generate optimised methods for special cases of a general function](https://discourse.julialang.org/t/efficient-approach-to-generate-optimised-methods-for-special-cases-of-a-general-function/110892)

<div class="topic-metadata">

**Author:** [@TimHargreaves](https://discourse.julialang.org/u/TimHargreaves)\
**Replies:** 5\
**Last updated:** [March 2, 2024, 6:46pm UTC](https://discourse.julialang.org/t/efficient-approach-to-generate-optimised-methods-for-special-cases-of-a-general-function/110892 "2024-03-02T18:46:55Z")

</div>

I am a fairly new user of Julia so may have misconceptions about the language’s capabilities and behaviour. Problem Statement I have implemented the most general form of an algorithm I am interested in, which is parame…

---

## [Transform! changes the type of my variable](https://discourse.julialang.org/t/transform-changes-the-type-of-my-variable/110968)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 7\
**Last updated:** [March 2, 2024, 8:36pm UTC](https://discourse.julialang.org/t/transform-changes-the-type-of-my-variable/110968 "2024-03-02T20:36:44Z")

</div>

I have a mix of strings and missing values, so I have defined my DF column to be Union{String,Missing} In rare cases, all the values in this column might be missing. In this case, transform! will convert the column to b…

---

## [Directory issue](https://discourse.julialang.org/t/directory-issue/111055)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 3\
**Last updated:** [March 2, 2024, 9:10pm UTC](https://discourse.julialang.org/t/directory-issue/111055 "2024-03-02T21:10:20Z")

</div>

This is a little code: const file\_path::String = "./try" file\_out = open(file\_path, "w") a::Int64 = 1 write(file\_out, a) close(file\_out) file\_in = open(file\_path, "r") b::Int64 = read(file\_in, Int64) close(file\_in) pri…

---

## [Easy way to update text in terminal (instead of printing more text)?](https://discourse.julialang.org/t/easy-way-to-update-text-in-terminal-instead-of-printing-more-text/81818)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 7\
**Last updated:** [March 2, 2024, 8:50pm UTC](https://discourse.julialang.org/t/easy-way-to-update-text-in-terminal-instead-of-printing-more-text/81818 "2024-03-02T20:50:48Z")

</div>

I would like to show progress of a for loop, updating the text like like “1/100”, “2/200”, until “100/100”. The rest of the program, before or after the loop, would print text in the usual way without changing old text. …

---

## [Makie not triggering on scroll/zoom events](https://discourse.julialang.org/t/makie-not-triggering-on-scroll-zoom-events/111070)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 0\
**Last updated:** [March 2, 2024, 7:48pm UTC](https://discourse.julialang.org/t/makie-not-triggering-on-scroll-zoom-events/111070 "2024-03-02T19:48:17Z")

</div>

I am using this code from docs but I am not getting the event on scroll/zoom. on(events(ax.scene).scroll) do event focus\[\] = false end Any ideas as to why?

---

## [Parsing strings into Float32 handling empty values](https://discourse.julialang.org/t/parsing-strings-into-float32-handling-empty-values/111057)

<div class="topic-metadata">

**Author:** [@Pino](https://discourse.julialang.org/u/Pino)\
**Replies:** 1\
**Last updated:** [March 2, 2024, 12:08pm UTC](https://discourse.julialang.org/t/parsing-strings-into-float32-handling-empty-values/111057 "2024-03-02T12:08:40Z")

</div>

Hi, I’m trying to get a Float32 dataframe from SQL data extracted as strings df\[!, "Equity"\] = parse.(Float32, df\[!, "Equity"\]) # Convert to Float32 But I’ve empty rows, therefore I’ve ERROR: ArgumentError: cannot pa…

---

## [Maybe this is off topic but I don't think so](https://discourse.julialang.org/t/maybe-this-is-off-topic-but-i-dont-think-so/111040)

<div class="topic-metadata">

**Author:** [@skypuppy](https://discourse.julialang.org/u/skypuppy)\
**Replies:** 0\
**Last updated:** [March 2, 2024, 3:31am UTC](https://discourse.julialang.org/t/maybe-this-is-off-topic-but-i-dont-think-so/111040 "2024-03-02T03:31:58Z")

</div>

As a present to myself, I built my Christmas gift: Ryzen 9 9750 on an Asrock mobo, 64 gb main memory (128 implementation still has problems AIUI,) and a Unicorn for main NVMe drive (gen 4!- gen 5 still not available to m…

---

## [LOAD\_PATH, meaning of the content](https://discourse.julialang.org/t/load-path-meaning-of-the-content/111031)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 2\
**Last updated:** [March 2, 2024, 12:37am UTC](https://discourse.julialang.org/t/load-path-meaning-of-the-content/111031 "2024-03-02T00:37:53Z")

</div>

julia\> LOAD\_PATH 3-element Vector{String}: "@" "@v#.#" "@stdlib" What does the three elements here mean? I am interested in this variable because I saw the following code at the beginning of a script push!(LOAD\_PAT…

---

## [JupyterLite, Julia and WebAssembly?](https://discourse.julialang.org/t/jupyterlite-julia-and-webassembly/74496)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 5\
**Last updated:** [March 1, 2024, 10:32pm UTC](https://discourse.julialang.org/t/jupyterlite-julia-and-webassembly/74496 "2024-03-01T22:32:28Z")

</div>

Looks like JupyterLite is getting more traction for teaching, demos, and so on. Does anyone have concrete plans regarding Julia at this point? I know @Keno, @vchuravy and others have work going on in https://github.com/…

---

## [Distributed computing using addprocs](https://discourse.julialang.org/t/distributed-computing-using-addprocs/110984)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 4\
**Last updated:** [March 1, 2024, 8:02pm UTC](https://discourse.julialang.org/t/distributed-computing-using-addprocs/110984 "2024-03-01T20:02:31Z")

</div>

I have a simple question on using Distributed.jl. I am working on an 8-core machine. Now, I have a simple loop that I can parallelize. So I carry out the following commands: using Distributed addprocs(30) @everywhere …

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

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