# General Usage

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

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

**Page:** 197

---

## [Zero-dimensional array interface for custom type](https://discourse.julialang.org/t/zero-dimensional-array-interface-for-custom-type/110609)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 1\
**Last updated:** [February 23, 2024, 1:25am UTC](https://discourse.julialang.org/t/zero-dimensional-array-interface-for-custom-type/110609 "2024-02-23T01:25:49Z")

</div>

I have struct S the\_only\_field end For my struct to hold data, I need it to have a field, and that means I need the field to have a name. But I would like to use it without having to define something like the\_only\_fiel…

---

## [Bwareaopen in Julia?](https://discourse.julialang.org/t/bwareaopen-in-julia/110603)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 4\
**Last updated:** [February 22, 2024, 11:04pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603 "2024-02-22T23:04:14Z")

</div>

Hi, I’ve searched (basically, googled it) but could not find one, thought I’m convinced that id does exist. Anyone knows how to do what Matlab’s bwareaopen does? Thanks.

---

## [Alternative to multivariatestats.jl](https://discourse.julialang.org/t/alternative-to-multivariatestats-jl/110540)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 6\
**Last updated:** [February 22, 2024, 9:45pm UTC](https://discourse.julialang.org/t/alternative-to-multivariatestats-jl/110540 "2024-02-22T21:45:13Z")

</div>

Hello, good evening. There are alternatives to multivariatestats.jl?

---

## [How to display precompilation/import time with Documenter.jl?](https://discourse.julialang.org/t/how-to-display-precompilation-import-time-with-documenter-jl/110607)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 0\
**Last updated:** [February 22, 2024, 9:37pm UTC](https://discourse.julialang.org/t/how-to-display-precompilation-import-time-with-documenter-jl/110607 "2024-02-22T21:37:28Z")

</div>

When I put Pkg.precompile("Mypkg") or @time\_imports using Mypkg in a @repl block, no output is rendered. How do I get the same output as what I have in my repl?

---

## [ArgumentError: Cannot find the parent of](https://discourse.julialang.org/t/argumenterror-cannot-find-the-parent-of/110514)

<div class="topic-metadata">

**Author:** [@maltee1](https://discourse.julialang.org/u/maltee1)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 6:16pm UTC](https://discourse.julialang.org/t/argumenterror-cannot-find-the-parent-of/110514 "2024-02-22T18:16:42Z")

</div>

I’m trying to get started using modeling toolkit, but I’m hitting an ArgumentError that I can’t interpret. This is my code: using Plots; pyplot() using ControlSystemsBase, RobustAndOptimalControl, LinearAlgebra using Mo…

---

## [Type stable generic memoisation](https://discourse.julialang.org/t/type-stable-generic-memoisation/96237)

<div class="topic-metadata">

**Author:** [@mhinsch](https://discourse.julialang.org/u/mhinsch)\
**Replies:** 23\
**Last updated:** [February 22, 2024, 10:06am UTC](https://discourse.julialang.org/t/type-stable-generic-memoisation/96237 "2024-02-22T10:06:57Z")

</div>

I’ve been looking into memoisation in Julia for a bit and although there are quite a few packages, as far as I tell all of them either store the results in some variation of Dict{Any, Any} or require you to commit to a s…

---

## [Problem with local scope](https://discourse.julialang.org/t/problem-with-local-scope/110556)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 5\
**Last updated:** [February 22, 2024, 2:43pm UTC](https://discourse.julialang.org/t/problem-with-local-scope/110556 "2024-02-22T14:43:36Z")

</div>

I am faced with an issue that I can’t seem to figure out. Here is the source code (sorry I couldn’t come up with a more simple example): macro handfunc(expr, kwargs...) expr = unblock(expr) # cleans expression expr…

---

## [Using julia to calculate Ramanujan constant](https://discourse.julialang.org/t/using-julia-to-calculate-ramanujan-constant/110578)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 2\
**Last updated:** [February 22, 2024, 1:48pm UTC](https://discourse.julialang.org/t/using-julia-to-calculate-ramanujan-constant/110578 "2024-02-22T13:48:01Z")

</div>

We should use BigFloat to get so many digits, right? But how?

---

## [How to create a DataFrame with specific number of columns and rows and fill it with zeros?](https://discourse.julialang.org/t/how-to-create-a-dataframe-with-specific-number-of-columns-and-rows-and-fill-it-with-zeros/110493)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 7\
**Last updated:** [February 22, 2024, 1:38pm UTC](https://discourse.julialang.org/t/how-to-create-a-dataframe-with-specific-number-of-columns-and-rows-and-fill-it-with-zeros/110493 "2024-02-22T13:38:53Z")

</div>

Hi! I’m trying to create a dataframe where the first column have certain number of rows named in the following way: df = DataFrame("Names" =\> names(df\_rowname)\[2:end\]) Now I want to add n number of columns to df with …

---

## [How to get the output of the function \`print()\`?](https://discourse.julialang.org/t/how-to-get-the-output-of-the-function-print/110573)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 11\
**Last updated:** [February 22, 2024, 1:09pm UTC](https://discourse.julialang.org/t/how-to-get-the-output-of-the-function-print/110573 "2024-02-22T13:09:06Z")

</div>

For example, I have a function: greet() = print("Hello World!") Now I want to test whether the output of this function is indeed ”Hello World!“. How can I realize this using the package Test? In other word, what should…

---

## [Access denied for plotting artifacts](https://discourse.julialang.org/t/access-denied-for-plotting-artifacts/110570)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [February 22, 2024, 12:09pm UTC](https://discourse.julialang.org/t/access-denied-for-plotting-artifacts/110570 "2024-02-22T12:09:04Z")

</div>

For seemingly no reason, I encountered an error with GR\_jll failing to compile. Nothing changed on my system as far as I can tell. This ultimately lead the error below after upgrading from Julia 1.10 to 1.10.1. Precompi…

---

## [BinaryBuilder: what do I lose by using newer GCC?](https://discourse.julialang.org/t/binarybuilder-what-do-i-lose-by-using-newer-gcc/110553)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 11:15am UTC](https://discourse.julialang.org/t/binarybuilder-what-do-i-lose-by-using-newer-gcc/110553 "2024-02-22T11:15:00Z")

</div>

The documentation for BinaryBuilder.jl says, “Generally speaking, we try to build with the as old as possible version of GCC (v4.8.5 being the oldest one currently available), for maximum compatibility.” However, some l…

---

## [Problems with LinearAlgebra functions within KernelAbstractions and CUDA](https://discourse.julialang.org/t/problems-with-linearalgebra-functions-within-kernelabstractions-and-cuda/97566)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 9\
**Last updated:** [February 22, 2024, 9:58am UTC](https://discourse.julialang.org/t/problems-with-linearalgebra-functions-within-kernelabstractions-and-cuda/97566 "2024-02-22T09:58:47Z")

</div>

I’m almost done porting my solver over to GPU with the help of CUDA and KernelAbstractions. However, I keep running into problem with LinearAlgebra functions. Take this simple example using StaticArrays using CUDA: allo…

---

## [Help improving the speed of a DataFrames operation](https://discourse.julialang.org/t/help-improving-the-speed-of-a-dataframes-operation/107615)

<div class="topic-metadata">

**Author:** [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)\
**Replies:** 37\
**Last updated:** [February 22, 2024, 9:25am UTC](https://discourse.julialang.org/t/help-improving-the-speed-of-a-dataframes-operation/107615 "2024-02-22T09:25:18Z")

</div>

Hi all, quick question (hopefully) related to doing an operation on DataFrames. I am trying to improve the transformation below so any help would be great. More context and MWE are at the bottom. Thanks for all the hel…

---

## [Fastest approach to returning a vector of elements choose 2](https://discourse.julialang.org/t/fastest-approach-to-returning-a-vector-of-elements-choose-2/110494)

<div class="topic-metadata">

**Author:** [@narnold0](https://discourse.julialang.org/u/narnold0)\
**Replies:** 22\
**Last updated:** [February 22, 2024, 6:18am UTC](https://discourse.julialang.org/t/fastest-approach-to-returning-a-vector-of-elements-choose-2/110494 "2024-02-22T06:18:46Z")

</div>

Hi there. I’m trying to do the following, given a vector of elements, I wish to get the vector of tuples containing the elements choose 2, with the order of the tuples obviously not mattering. Importantly, I am trying t…

---

## [How to achieve a similar progress bar effect in my own code?](https://discourse.julialang.org/t/how-to-achieve-a-similar-progress-bar-effect-in-my-own-code/110558)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 6\
**Last updated:** [February 22, 2024, 3:42am UTC](https://discourse.julialang.org/t/how-to-achieve-a-similar-progress-bar-effect-in-my-own-code/110558 "2024-02-22T03:42:30Z")

</div>

How to achieve a similar progress bar effect (and the rotating circle symbol underneath it) in my own code to the project precompilation process?

---

## ["Unable to open libLLVM!" error trying to create\_sysimage in 1.8.0](https://discourse.julialang.org/t/unable-to-open-libllvm-error-trying-to-create-sysimage-in-1-8-0/86144)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 10\
**Last updated:** [February 22, 2024, 12:52am UTC](https://discourse.julialang.org/t/unable-to-open-libllvm-error-trying-to-create-sysimage-in-1-8-0/86144 "2024-02-22T00:52:35Z")

</div>

I updated to Julia 1.8.0 this morning, ran \]update, and tried to rebuild my sysimage. I noticed that there appears to be something wrong with the BinaryProvider package. I explicitly added the package \]add BinaryProvider …

---

## [Can JuliaCall easily handle multi-threading?](https://discourse.julialang.org/t/can-juliacall-easily-handle-multi-threading/110537)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 14\
**Last updated:** [February 22, 2024, 12:43am UTC](https://discourse.julialang.org/t/can-juliacall-easily-handle-multi-threading/110537 "2024-02-22T00:43:04Z")

</div>

Hello! I’m developing a Julia package that I would like to port to Python. I heard that JuliaCall is the way to go, as many famous packages such as diffeqpy and pySR are now using it. The package that I’m developing is …

---

## [Zero allocated iterator for powersets](https://discourse.julialang.org/t/zero-allocated-iterator-for-powersets/110549)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 0\
**Last updated:** [February 21, 2024, 10:36pm UTC](https://discourse.julialang.org/t/zero-allocated-iterator-for-powersets/110549 "2024-02-21T22:36:40Z")

</div>

Starting with the empty set, Gray codes can be used to determine the next element to add or remove so that you eventually hit every subset exactly once. Unfortunately, I’m having trouble creating an iterator for this set…

---

## [Updating values in a dictionary with a minimum of lookups](https://discourse.julialang.org/t/updating-values-in-a-dictionary-with-a-minimum-of-lookups/110544)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 2\
**Last updated:** [February 21, 2024, 10:04pm UTC](https://discourse.julialang.org/t/updating-values-in-a-dictionary-with-a-minimum-of-lookups/110544 "2024-02-21T22:04:34Z")

</div>

I’m trying to do random-access updates to Int values in a dictionary in the most efficient way possible, but it seems hard to avoid extra hash calls. Here’s the naive approach: struct A x::Int end function Base.has…

---

## [What is julia doing with your threads?](https://discourse.julialang.org/t/what-is-julia-doing-with-your-threads/110052)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 23\
**Last updated:** [February 21, 2024, 10:04pm UTC](https://discourse.julialang.org/t/what-is-julia-doing-with-your-threads/110052 "2024-02-21T22:04:26Z")

</div>

As documented here and in this thread, spinning up julia with a certain number of threads, let us say N, and then starting (N-1) tasks does not necessarily mean that all the tasks will have a thread to run on. It appear…

---

## [Macro: extract the method name, arguments and the body](https://discourse.julialang.org/t/macro-extract-the-method-name-arguments-and-the-body/110343)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 3\
**Last updated:** [February 21, 2024, 10:00pm UTC](https://discourse.julialang.org/t/macro-extract-the-method-name-arguments-and-the-body/110343 "2024-02-21T22:00:44Z")

</div>

There are two syntaxes that I know that defines a function: julia\> Meta.@dump function f(x) x end Expr head: Symbol function args: Array{Any}((2,)) 1: Expr head: Symbol call args: Array…

---

## [Symbolics coefficients](https://discourse.julialang.org/t/symbolics-coefficients/110541)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [February 21, 2024, 9:44pm UTC](https://discourse.julialang.org/t/symbolics-coefficients/110541 "2024-02-21T21:44:54Z")

</div>

What is happening? How do I get 4 out of this? using Symbolics @variables a b julia\> Symbolics.coeff(4a\*b).dict Dict{Any, Any} with 2 entries: a =\> 1 b =\> 1

---

## [How to add other arguments to function turned to LinearOperator?](https://discourse.julialang.org/t/how-to-add-other-arguments-to-function-turned-to-linearoperator/110475)

<div class="topic-metadata">

**Author:** [@erny123](https://discourse.julialang.org/u/erny123)\
**Replies:** 3\
**Last updated:** [February 21, 2024, 9:16pm UTC](https://discourse.julialang.org/t/how-to-add-other-arguments-to-function-turned-to-linearoperator/110475 "2024-02-21T21:16:47Z")

</div>

Trying to write a matrix-free solver using LinearOperators.jl and Krylov.jl However, from this: Introduction to Linear Operators I’m seeing that you can only use functions that follow the 5-argument (and 3) mul! operat…

---

## [Mul! generates machine noise](https://discourse.julialang.org/t/mul-generates-machine-noise/110477)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 21\
**Last updated:** [February 21, 2024, 8:24pm UTC](https://discourse.julialang.org/t/mul-generates-machine-noise/110477 "2024-02-21T20:24:06Z")

</div>

I have this simple matrix multiplication, but at the last step some machine noise is created and I don’t know why. This doesn’t happen in other programming languages. using LinearAlgebra function myfun1() a = 0.707…

---

## [Get length of a fully represented float](https://discourse.julialang.org/t/get-length-of-a-fully-represented-float/110521)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 12\
**Last updated:** [February 21, 2024, 7:42pm UTC](https://discourse.julialang.org/t/get-length-of-a-fully-represented-float/110521 "2024-02-21T19:42:57Z")

</div>

Hello, I must work with a dataset of float numerical entries. A few of them (like 0.1%) are really small and thus are written in e-notation (e.g. 1.87589e-17). I’m passing this dataset to a C program via Julia and appar…

---

## [Random seed initialization with splitmix](https://discourse.julialang.org/t/random-seed-initialization-with-splitmix/110426)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 6\
**Last updated:** [February 21, 2024, 7:02pm UTC](https://discourse.julialang.org/t/random-seed-initialization-with-splitmix/110426 "2024-02-21T19:02:16Z")

</div>

I know that to use Xoshiro256++ is better to randomize the seed with a fast rng as splitmix. This enables us to generate the 4 states of xoshiro256++. Is this done by default?

---

## [2024: Tables.jl vs TableTraits.jl/IterableTables.jl?](https://discourse.julialang.org/t/2024-tables-jl-vs-tabletraits-jl-iterabletables-jl/110524)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [February 21, 2024, 4:31pm UTC](https://discourse.julialang.org/t/2024-tables-jl-vs-tabletraits-jl-iterabletables-jl/110524 "2024-02-21T16:31:51Z")

</div>

It is 6 years after Tables.jl appeared and when I am searching for this vs TableTraits.jl / IterableTables.jl I still get pointed to this old thread. It seems that the queryverse never switched to Tables.jl, hence this …

---

## [Is there a function inverse of \`Logging.disable\_logging\`?](https://discourse.julialang.org/t/is-there-a-function-inverse-of-logging-disable-logging/110525)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 0\
**Last updated:** [February 21, 2024, 4:22pm UTC](https://discourse.julialang.org/t/is-there-a-function-inverse-of-logging-disable-logging/110525 "2024-02-21T16:22:21Z")

</div>

Hi, I find the following function very useful for switching my computations from a dev mode to a production mode: Logging.disable\_logging(Logging.Info) Unfortunately, if I want to switch back, I can’t just remove the …

---

## [Passing \`Symbol\` variable allocates when literal does not?](https://discourse.julialang.org/t/passing-symbol-variable-allocates-when-literal-does-not/110518)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 4\
**Last updated:** [February 21, 2024, 4:04pm UTC](https://discourse.julialang.org/t/passing-symbol-variable-allocates-when-literal-does-not/110518 "2024-02-21T16:04:44Z")

</div>

I have the following snippet: function preparearrays!(arrays, N, L; mode = :all) for n in 0:(length(arrays)-1) if mode === :all for m in 0:(L-1) # run till length L to zero all bits …

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

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