# General Usage

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

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

**Page:** 287

---

## [Broadcast update multiple vectors at once](https://discourse.julialang.org/t/broadcast-update-multiple-vectors-at-once/99490)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 7\
**Last updated:** [May 28, 2023, 7:24am UTC](https://discourse.julialang.org/t/broadcast-update-multiple-vectors-at-once/99490 "2023-05-28T07:24:51Z")

</div>

Simple question. I have a few vectors which hold the states of a list of particles. I update these with broadcast (which is nice since the vectors are on the GPU). For example: position⁰ .= position position .+=…

---

## [Where does the cart-pole environment in the Julia official page come from?](https://discourse.julialang.org/t/where-does-the-cart-pole-environment-in-the-julia-official-page-come-from/99505)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 1\
**Last updated:** [May 28, 2023, 8:46am UTC](https://discourse.julialang.org/t/where-does-the-cart-pole-environment-in-the-julia-official-page-come-from/99505 "2023-05-28T08:46:58Z")

</div>

What is the environment shown in the cart-pole illustration that appears on the machine learning tab of the Julia website? Which package does it come from? Are there any existing packages in Julia that can be used for co…

---

## [Using arrays/vectors in Octo.jl queries](https://discourse.julialang.org/t/using-arrays-vectors-in-octo-jl-queries/99501)

<div class="topic-metadata">

**Author:** [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Replies:** 0\
**Last updated:** [May 28, 2023, 2:04am UTC](https://discourse.julialang.org/t/using-arrays-vectors-in-octo-jl-queries/99501 "2023-05-28T02:04:15Z")

</div>

I am trying to write this query for postgres using Octo.jl # postgres select all elements from table where column is in list and return in same order as list # SELECT \* # FROM your\_table # WHERE your\_c…

---

## [Changing to a different macOS Terminal for Julia](https://discourse.julialang.org/t/changing-to-a-different-macos-terminal-for-julia/97675)

<div class="topic-metadata">

**Author:** [@OldSubSailor](https://discourse.julialang.org/u/OldSubSailor)\
**Replies:** 14\
**Last updated:** [May 27, 2023, 11:48pm UTC](https://discourse.julialang.org/t/changing-to-a-different-macos-terminal-for-julia/97675 "2023-05-27T23:48:04Z")

</div>

Hello, I just discovered Julia 2 days ago and started the Academy class this afternoon. I see that the REPL defaults to the standard Mac Terminal which is OK, but I also found the WARP Terminal that I am interested in e…

---

## [Can I make Julia eval a variable before using it as a kwargs?](https://discourse.julialang.org/t/can-i-make-julia-eval-a-variable-before-using-it-as-a-kwargs/99322)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 10\
**Last updated:** [May 27, 2023, 9:53pm UTC](https://discourse.julialang.org/t/can-i-make-julia-eval-a-variable-before-using-it-as-a-kwargs/99322 "2023-05-27T21:53:48Z")

</div>

Hi! I’m building a DataFrame with the column names stored in some variables (both as symbols and strings): adc\_I\_title = "Arc ADC Current (A)" adc\_V\_title = "Arc ADC Voltage (V)" adc\_I\_symbol = Symbol(adc\_I\_title) adc\_V…

---

## [What's the point of \`ntasks\` in \`asyncmap\`](https://discourse.julialang.org/t/whats-the-point-of-ntasks-in-asyncmap/99492)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 3\
**Last updated:** [May 27, 2023, 9:19pm UTC](https://discourse.julialang.org/t/whats-the-point-of-ntasks-in-asyncmap/99492 "2023-05-27T21:19:53Z")

</div>

julia\> function f(\_...) s = 0.0 for i = 1:10^9 s = max(cos(i), sin(i)) end return s end f (generic function with 2 methods) julia\> asyncmap(f, 1:2) I al…

---

## [Pyarrow conversion with PythonCall](https://discourse.julialang.org/t/pyarrow-conversion-with-pythoncall/99485)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 11\
**Last updated:** [May 27, 2023, 4:03pm UTC](https://discourse.julialang.org/t/pyarrow-conversion-with-pythoncall/99485 "2023-05-27T16:03:17Z")

</div>

It would appear to me that PythonCall.jl does not convert pyarrow tables to DataFrames. I get the error ERROR: cannot convert this Python 'Table' to a Julia 'PyTable' Since PyTable(x) wraps Tables.jl compatible tables,…

---

## [How to adjust the range of the coordinate axis when using UnicodePlots.jl to plot a graph?](https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [May 27, 2023, 1:27pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483 "2023-05-27T13:27:41Z")

</div>

How to adjust the range of the coordinate axis when using UnicodePlots.jl to plot a graph? As shown in the figure, I hope that the x-axis range can be from 1 to 201. Is it possible to achieve this?

---

## [What things i can/cannot do within an extension?](https://discourse.julialang.org/t/what-things-i-can-cannot-do-within-an-extension/99474)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 0\
**Last updated:** [May 27, 2023, 7:06am UTC](https://discourse.julialang.org/t/what-things-i-can-cannot-do-within-an-extension/99474 "2023-05-27T07:06:28Z")

</div>

the main thing that you can do in an extension is extend methods: main pkg (A) module A function f(x::Int) = "A.f on Int" end ABExt: module ABExt function f(x::B.Thing) = "A.f on B.thing") end my main question i…

---

## [Microsoft Teams Markdown language options don't include julia](https://discourse.julialang.org/t/microsoft-teams-markdown-language-options-dont-include-julia/99380)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 7\
**Last updated:** [May 27, 2023, 4:52am UTC](https://discourse.julialang.org/t/microsoft-teams-markdown-language-options-dont-include-julia/99380 "2023-05-27T04:52:05Z")

</div>

Our company is switching to Microsoft Teams. In the chat messages it allows code markdown to be included, but Julia-lang is not an option. Google and Bing searches don’t seem to tell me if there is a way to somehow ena…

---

## [Efficient pushforward (Jacobian vector product) with multiple vectors using automatic differentiation](https://discourse.julialang.org/t/efficient-pushforward-jacobian-vector-product-with-multiple-vectors-using-automatic-differentiation/99408)

<div class="topic-metadata">

**Author:** [@cadaverous](https://discourse.julialang.org/u/cadaverous)\
**Replies:** 13\
**Last updated:** [May 27, 2023, 1:18am UTC](https://discourse.julialang.org/t/efficient-pushforward-jacobian-vector-product-with-multiple-vectors-using-automatic-differentiation/99408 "2023-05-27T01:18:44Z")

</div>

Hello! I have written some code that computes the pushforward of a time-stepping function with multiple vectors: julia\> function my\_step\_pushforward!(u, Ψ, Δt) rank = size(Ψ)\[2\] # Ψ is an n X rank matrix …

---

## [Very strange problems installing on win10](https://discourse.julialang.org/t/very-strange-problems-installing-on-win10/77416)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 16\
**Last updated:** [May 27, 2023, 12:58am UTC](https://discourse.julialang.org/t/very-strange-problems-installing-on-win10/77416 "2023-05-27T00:58:52Z")

</div>

sigh never had a problem before. i’m trying to install on my work PC and getting very erratic behavior. i have tried several times with both 1.6.5 and 1.7.2 and either 1 the executable is not present. that’s right e…

---

## [Performance costs associated with using local variable bindings](https://discourse.julialang.org/t/performance-costs-associated-with-using-local-variable-bindings/99465)

<div class="topic-metadata">

**Author:** [@qua4tre](https://discourse.julialang.org/u/qua4tre)\
**Replies:** 1\
**Last updated:** [May 26, 2023, 9:35pm UTC](https://discourse.julialang.org/t/performance-costs-associated-with-using-local-variable-bindings/99465 "2023-05-26T21:35:53Z")

</div>

Is there any impact on performance of a function from using local variable bindings for convenience and readability? For example, function foo(x) a,b = x\[1:2\] return a^2 + b^2 end vs function bar(x) retur…

---

## [Question about closed-source API packages](https://discourse.julialang.org/t/question-about-closed-source-api-packages/99462)

<div class="topic-metadata">

**Author:** [@SebKrantz](https://discourse.julialang.org/u/SebKrantz)\
**Replies:** 1\
**Last updated:** [May 26, 2023, 8:56pm UTC](https://discourse.julialang.org/t/question-about-closed-source-api-packages/99462 "2023-05-26T20:56:26Z")

</div>

I recently released SAMaDB.jl (South African Macroeconomic Database API) and published it to the General Registry (General/S/SAMaDB at master · JuliaRegistries/General · GitHub). After publishing I made the repository pr…

---

## [SYSTEM (REPL): showing an error caused an error](https://discourse.julialang.org/t/system-repl-showing-an-error-caused-an-error/99415)

<div class="topic-metadata">

**Author:** [@klowrey](https://discourse.julialang.org/u/klowrey)\
**Replies:** 7\
**Last updated:** [May 26, 2023, 6:01pm UTC](https://discourse.julialang.org/t/system-repl-showing-an-error-caused-an-error/99415 "2023-05-26T18:01:20Z")

</div>

Encountering a weird issue with Julia that seems to be something to do with some internal state as it persists between session restarts. This issue suddenly cropped up during a long running session, where states that wer…

---

## [Custom rule for differentiating through Newton solver using ForwardDiff: works for gradient, fails for hessian](https://discourse.julialang.org/t/custom-rule-for-differentiating-through-newton-solver-using-forwarddiff-works-for-gradient-fails-for-hessian/93002)

<div class="topic-metadata">

**Author:** [@touste](https://discourse.julialang.org/u/touste)\
**Replies:** 23\
**Last updated:** [May 26, 2023, 5:31pm UTC](https://discourse.julialang.org/t/custom-rule-for-differentiating-through-newton-solver-using-forwarddiff-works-for-gradient-fails-for-hessian/93002 "2023-05-26T17:31:05Z")

</div>

Hi all, I have a function obj(p) that solves for the parameter t of a Bezier curve B(t) so that the arclength is equal to some arbitrary value (2 in this kind-of-minimal example). It uses the Newton’s method. The Bezie…

---

## [Interest on Starting a JuliaHealth Workgroup?](https://discourse.julialang.org/t/interest-on-starting-a-juliahealth-workgroup/97999)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 19\
**Last updated:** [May 26, 2023, 3:13pm UTC](https://discourse.julialang.org/t/interest-on-starting-a-juliahealth-workgroup/97999 "2023-05-26T15:13:18Z")

</div>

Hi folks, I am really interested in starting a working group around JuliaHealth similar to the Julia HPC, Julia ML, and other workgroups here within the Julia community. In a nutshell, I am imagining the group could mee…

---

## [Arrays of concrete, mutable structs are not stored contiguously in memory](https://discourse.julialang.org/t/arrays-of-concrete-mutable-structs-are-not-stored-contiguously-in-memory/99423)

<div class="topic-metadata">

**Author:** [@aleferna12](https://discourse.julialang.org/u/aleferna12)\
**Replies:** 1\
**Last updated:** [May 26, 2023, 2:37pm UTC](https://discourse.julialang.org/t/arrays-of-concrete-mutable-structs-are-not-stored-contiguously-in-memory/99423 "2023-05-26T14:37:02Z")

</div>

Hey! Can someone explain to me why arrays of mutable structs are stored as arrays of pointers in memory? Example: struct A x::Int32 end mutable struct B x::Int32 end a = Array{A}(undef, 2) b = Array{B}(undef, 2) prin…

---

## [Parallelization gives wrong result](https://discourse.julialang.org/t/parallelization-gives-wrong-result/99409)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 12\
**Last updated:** [May 26, 2023, 1:56pm UTC](https://discourse.julialang.org/t/parallelization-gives-wrong-result/99409 "2023-05-26T13:56:35Z")

</div>

I have a simple function which, given a vector of floats x, returns a BitVector that has 1’s in places where the entry is nonzero. In other words, f(x) = (x .!=0.0). When I parallelize it, I get incorrect results: using…

---

## [N-dimensional view into an N+1 dimension array](https://discourse.julialang.org/t/n-dimensional-view-into-an-n-1-dimension-array/99345)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 15\
**Last updated:** [May 26, 2023, 10:41am UTC](https://discourse.julialang.org/t/n-dimensional-view-into-an-n-1-dimension-array/99345 "2023-05-26T10:41:10Z")

</div>

I have an Array{T,N+1} and I want to pass a slice/view of the first N dimensions to a function. If I knew, say, N=2 I would do b = @view a\[:,:,1\] f(b,args...) But the number of colons depends on N. Is there a way to do…

---

## [@manipulate with JSServe instead of WebIO?](https://discourse.julialang.org/t/manipulate-with-jsserve-instead-of-webio/96842)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 5\
**Last updated:** [May 26, 2023, 8:26am UTC](https://discourse.julialang.org/t/manipulate-with-jsserve-instead-of-webio/96842 "2023-05-26T08:26:15Z")

</div>

If I understand correctly, JSServe.jl provides functionality similar to WebIO.jl without the need of a Jupyter extension. Is there any reason one couldn’t implement the @manipulate macro of Interact.jl using JSServe inst…

---

## [Respecting Compat Bounds from Project.toml in Julia Package on GitHub CI](https://discourse.julialang.org/t/respecting-compat-bounds-from-project-toml-in-julia-package-on-github-ci/99411)

<div class="topic-metadata">

**Author:** [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Replies:** 6\
**Last updated:** [May 26, 2023, 8:19am UTC](https://discourse.julialang.org/t/respecting-compat-bounds-from-project-toml-in-julia-package-on-github-ci/99411 "2023-05-26T08:19:14Z")

</div>

Hello, I’m the maintainer of a Julia package, and I’ve specified version restrictions for dependencies in the \[compat\] section of my Project.toml file. However, when running CI workflows on GitHub, it seems to be using …

---

## [Installation of Plots](https://discourse.julialang.org/t/installation-of-plots/99270)

<div class="topic-metadata">

**Author:** [@srtiwari73](https://discourse.julialang.org/u/srtiwari73)\
**Replies:** 2\
**Last updated:** [May 26, 2023, 6:34am UTC](https://discourse.julialang.org/t/installation-of-plots/99270 "2023-05-26T06:34:36Z")

</div>

Hi team, I am new to Julia. I am trying to install “Plots” package for my analysis. But while “using Plots” commands shows an error. Below are the details of the error. While loading “Plots” package it shows following …

---

## [Why ODE solver so slow?](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773)

<div class="topic-metadata">

**Author:** [@soldin](https://discourse.julialang.org/u/soldin)\
**Replies:** 24\
**Last updated:** [May 26, 2023, 2:55am UTC](https://discourse.julialang.org/t/why-ode-solver-so-slow/98773 "2023-05-26T02:55:05Z")

</div>

The following example is taken from this page using Plots; gr() using Dates T1 = now() f(u,p,t) = 0.98u u0 = 1.0 tspan = (0.0,10.0) prob = ODEProblem(f,u0,tspan) sol = solve(prob) T2 = now() println(T2-T1) This c…

---

## [How to get the inner types of a parametric type](https://discourse.julialang.org/t/how-to-get-the-inner-types-of-a-parametric-type/99421)

<div class="topic-metadata">

**Author:** [@aleferna12](https://discourse.julialang.org/u/aleferna12)\
**Replies:** 1\
**Last updated:** [May 26, 2023, 2:34am UTC](https://discourse.julialang.org/t/how-to-get-the-inner-types-of-a-parametric-type/99421 "2023-05-26T02:34:39Z")

</div>

Hello! Is there a function that returns Real from Vector{Real}? e. g.: paramtype(Vector{Real}) should return Real. Bonus if it can be generalized for any data structure such as struct S{A, B, C} end (should return \[A, …

---

## [How to plot an equivalent of matlabs' surf plot in julia](https://discourse.julialang.org/t/how-to-plot-an-equivalent-of-matlabs-surf-plot-in-julia/99413)

<div class="topic-metadata">

**Author:** [@RDuarte](https://discourse.julialang.org/u/RDuarte)\
**Replies:** 1\
**Last updated:** [May 25, 2023, 10:50pm UTC](https://discourse.julialang.org/t/how-to-plot-an-equivalent-of-matlabs-surf-plot-in-julia/99413 "2023-05-25T22:50:22Z")

</div>

Dear all, How can I plot a 3D plot but from a top view. In fact what Im searching for is an equivalent function of surf() in matlab. Thanks in advance.

---

## [Is Possible to Know if a Variable Changed in Memory?](https://discourse.julialang.org/t/is-possible-to-know-if-a-variable-changed-in-memory/91210)

<div class="topic-metadata">

**Author:** [@cdelv](https://discourse.julialang.org/u/cdelv)\
**Replies:** 5\
**Last updated:** [May 25, 2023, 10:49pm UTC](https://discourse.julialang.org/t/is-possible-to-know-if-a-variable-changed-in-memory/91210 "2023-05-25T22:49:57Z")

</div>

This question is just for curiosity, but is it possible to know if a variables changed? For example v = \[1,2,3\] changed?(v) false v\[1\]=2 changed?(v) true

---

## [Why map function in named tuple is outputing only one item](https://discourse.julialang.org/t/why-map-function-in-named-tuple-is-outputing-only-one-item/99410)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 3\
**Last updated:** [May 25, 2023, 9:40pm UTC](https://discourse.julialang.org/t/why-map-function-in-named-tuple-is-outputing-only-one-item/99410 "2023-05-25T21:40:37Z")

</div>

Hello, good afternoon Why this named tuple is being outputed with a single mean when using map function? aq = readdlm("data.dat") data = (set1=(x=aq\[:,1\], y=aq\[:, 2\]), set2=(x=aq\[:,3\], y=aq\[:, 4\]), set3=(x=aq\[:…

---

## [Creating a module with python dependencies](https://discourse.julialang.org/t/creating-a-module-with-python-dependencies/99078)

<div class="topic-metadata">

**Author:** [@Ignacio\_Loaiza](https://discourse.julialang.org/u/Ignacio_Loaiza)\
**Replies:** 6\
**Last updated:** [May 25, 2023, 9:22pm UTC](https://discourse.julialang.org/t/creating-a-module-with-python-dependencies/99078 "2023-05-25T21:22:45Z")

</div>

Hi everyone! I wrote some Julia code that I’m trying to convert into a module so I can interface it with some python code through JuliaCall. My module uses PythonCall to run some python code. I am currently using the li…

---

## [Very slow startup in VScode](https://discourse.julialang.org/t/very-slow-startup-in-vscode/46996)

<div class="topic-metadata">

**Author:** [@MathMan](https://discourse.julialang.org/u/MathMan)\
**Replies:** 11\
**Last updated:** [May 25, 2023, 3:48pm UTC](https://discourse.julialang.org/t/very-slow-startup-in-vscode/46996 "2023-05-25T15:48:02Z")

</div>

I am new to Julia and I am using vscode with the Julia extension to run code. Unfortunately, Julia responds incredibly slow. Outputs into the terminal take 7-8 seconds every time I run this simple script. a = 2 b = 3 c …

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

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