# Latest

**URL:** https://discourse.julialang.org/latest.md?page=861

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

**Page:** 862

---

## [Matrix to row vector](https://discourse.julialang.org/t/matrix-to-row-vector/90417)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 9:22pm UTC](https://discourse.julialang.org/t/matrix-to-row-vector/90417 "2022-11-17T21:22:31Z")

</div>

Hello all, I have two matrices A = \[1 1 1; 1 1 1; 1 1 1\] B = \[1; 2; 3\] I want to multiply both of them row by row, meaning the answer should be A.\*B = \[1 1 1; 2 2 2; 3 3 3\] Now I want to covert this matrix to a row …

---

## [How to coerce scitype union to continuous?](https://discourse.julialang.org/t/how-to-coerce-scitype-union-to-continuous/90379)

<div class="topic-metadata">

**Author:** [@lucasmsoares96](https://discourse.julialang.org/u/lucasmsoares96)\
**Replies:** 1\
**Last updated:** [November 17, 2022, 8:51pm UTC](https://discourse.julialang.org/t/how-to-coerce-scitype-union-to-continuous/90379 "2022-11-17T20:51:38Z")

</div>

All columns in my DataFrame have the sci type Union{Continuous, Count} and I’m having trouble coercing them to Continuous. I tried the following two ways coerce(X, Count=\>Continuous) X |\> eachcol .|\> a -\> coerce(a, Con…

---

## [Improving pullback speed with list comprehension](https://discourse.julialang.org/t/improving-pullback-speed-with-list-comprehension/90361)

<div class="topic-metadata">

**Author:** [@mhar](https://discourse.julialang.org/u/mhar)\
**Replies:** 4\
**Last updated:** [November 17, 2022, 8:50pm UTC](https://discourse.julialang.org/t/improving-pullback-speed-with-list-comprehension/90361 "2022-11-17T20:50:08Z")

</div>

Here is a MWE of the function I have that needs AD. N = 100 function compute\_many\_prods(f, g) return \[f \* g \* i for i = 1:N\] end function compute\_many\_prods2(f, g) return compute\_many\_prods(f, g) end function Ch…

---

## [How to add a property for all custom structs?](https://discourse.julialang.org/t/how-to-add-a-property-for-all-custom-structs/90266)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 8\
**Last updated:** [November 17, 2022, 8:24pm UTC](https://discourse.julialang.org/t/how-to-add-a-property-for-all-custom-structs/90266 "2022-11-17T20:24:58Z")

</div>

Hi! I made my custom types as below. As can be seen in the script, I’d like to impose a new property c to all types which are subtypes of AbstractMine. Should I change all of the definitions of the subtypes? Or, is t…

---

## [Is previous function apply remove from base?](https://discourse.julialang.org/t/is-previous-function-apply-remove-from-base/90367)

<div class="topic-metadata">

**Author:** [@somranger](https://discourse.julialang.org/u/somranger)\
**Replies:** 8\
**Last updated:** [November 17, 2022, 7:39pm UTC](https://discourse.julialang.org/t/is-previous-function-apply-remove-from-base/90367 "2022-11-17T19:39:25Z")

</div>

In this link, https://stackoverflow.com/a/22873866/20438781 it seems that there was an apply function transfer a tuple to a function. However, it disappears in current version, and Varargs Functions still exists. Certai…

---

## [Suggestions to improve Zygote performance for simple vector map/broadcast/comprehension?](https://discourse.julialang.org/t/suggestions-to-improve-zygote-performance-for-simple-vector-map-broadcast-comprehension/35207)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 6\
**Last updated:** [November 9, 2022, 3:13am UTC](https://discourse.julialang.org/t/suggestions-to-improve-zygote-performance-for-simple-vector-map-broadcast-comprehension/35207 "2022-11-09T03:13:54Z")

</div>

I’ve got some code which is building some moderate sized vectors, which I’d like to derive through. Here’s an example building these vectors with a comprehension (the issue is the same if I use map or broadcast): build\_…

---

## [Any suggestion for speeding up my function?](https://discourse.julialang.org/t/any-suggestion-for-speeding-up-my-function/90393)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 11\
**Last updated:** [November 17, 2022, 5:39pm UTC](https://discourse.julialang.org/t/any-suggestion-for-speeding-up-my-function/90393 "2022-11-17T17:39:01Z")

</div>

Hi, I have a function accepts 4 matrixs and do some caculations, it works well but very slow. I wonder to know how to improve its performance? I’m wondering if it’s possible to be faster, I just know that using @. the…

---

## [Output type from input function handle output type?](https://discourse.julialang.org/t/output-type-from-input-function-handle-output-type/90373)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 13\
**Last updated:** [November 17, 2022, 4:52pm UTC](https://discourse.julialang.org/t/output-type-from-input-function-handle-output-type/90373 "2022-11-17T16:52:36Z")

</div>

I have a recursive function that takes in a function handle, and eventually calls that function. It’s causing some allocations because the compiler can’t work out the output type of my recursive function. Is there a way …

---

## [Multiple modules in compilecache file?](https://discourse.julialang.org/t/multiple-modules-in-compilecache-file/90406)

<div class="topic-metadata">

**Author:** [@green.nsk](https://discourse.julialang.org/u/green.nsk)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 3:21pm UTC](https://discourse.julialang.org/t/multiple-modules-in-compilecache-file/90406 "2022-11-17T15:21:52Z")

</div>

I was down a rabbithole trying to understand why I am getting multiple versions of a single package loaded in my application. And I think I narrowed it down to the fact that one of precompile cache files contains two “mo…

---

## [Define a \`mapat\` function to map a function over specific indices](https://discourse.julialang.org/t/define-a-mapat-function-to-map-a-function-over-specific-indices/90392)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 3\
**Last updated:** [November 17, 2022, 3:02pm UTC](https://discourse.julialang.org/t/define-a-mapat-function-to-map-a-function-over-specific-indices/90392 "2022-11-17T15:02:42Z")

</div>

I have an Array and want to map a function over selected indices, I tried the following two implementations: # Map function \`f\` at specific indices of an array and update in-place function mapat!(f, array, indices...) …

---

## [Animations with PlotlyJS?](https://discourse.julialang.org/t/animations-with-plotlyjs/34633)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 6\
**Last updated:** [November 17, 2022, 1:17am UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633 "2022-11-17T01:17:16Z")

</div>

Has anyone put together an animated plot using PlotlyJS to display the progress of a computation (so not a postprocessed gif and such)? If so, is there an example?

---

## [Debugging computer crash during ODE solve](https://discourse.julialang.org/t/debugging-computer-crash-during-ode-solve/90009)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 25\
**Last updated:** [November 17, 2022, 2:43pm UTC](https://discourse.julialang.org/t/debugging-computer-crash-during-ode-solve/90009 "2022-11-17T14:43:26Z")

</div>

My desktop solves a set of ODEs without issue, but my laptop consistently bluescreens while solving. What is the best way to find the cause of this behavior? Thanks!

---

## [How to check if an imported name is used in a module?](https://discourse.julialang.org/t/how-to-check-if-an-imported-name-is-used-in-a-module/90400)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 2:13pm UTC](https://discourse.julialang.org/t/how-to-check-if-an-imported-name-is-used-in-a-module/90400 "2022-11-17T14:13:45Z")

</div>

I want to check if all the names being imported in a module are being used somewhere, and return a list of names that aren’t being used in the module. The simple way to do this is to grep for every name, but I was wonder…

---

## [Can \`Plots.jl\` \`heatmap\` coordinates start at 1 instead of 0.5?](https://discourse.julialang.org/t/can-plots-jl-heatmap-coordinates-start-at-1-instead-of-0-5/90385)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 4\
**Last updated:** [November 17, 2022, 1:25pm UTC](https://discourse.julialang.org/t/can-plots-jl-heatmap-coordinates-start-at-1-instead-of-0-5/90385 "2022-11-17T13:25:27Z")

</div>

For example, I want to heatmap the following matrix: julia\> m = \[ 1 1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 -1 1 1 \] using Plots heatmap(m) But if I set xlims and y…

---

## [Mysterious allocations in nested scalar loops](https://discourse.julialang.org/t/mysterious-allocations-in-nested-scalar-loops/90380)

<div class="topic-metadata">

**Author:** [@gtgt](https://discourse.julialang.org/u/gtgt)\
**Replies:** 5\
**Last updated:** [November 17, 2022, 12:59pm UTC](https://discourse.julialang.org/t/mysterious-allocations-in-nested-scalar-loops/90380 "2022-11-17T12:59:29Z")

</div>

I am writing some code to solve Project Euler #60. Given an upper bound N, the program uses 5 nested for loops to find the smallest sum of quintuples (p\_1, p\_2, p\_3, p\_4, p\_5) of prime numbers, p\_i \\leqslant N such that …

---

## [Order of parameters in a function that has side effects](https://discourse.julialang.org/t/order-of-parameters-in-a-function-that-has-side-effects/90397)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 1\
**Last updated:** [November 17, 2022, 12:09pm UTC](https://discourse.julialang.org/t/order-of-parameters-in-a-function-that-has-side-effects/90397 "2022-11-17T12:09:09Z")

</div>

Is it a Julia convention to list the parameters with side effects first in the list of parameters, where those that have no side effects are listed last? I was looking at some of the code in base and the convention did n…

---

## [Interpreting output of Profile: Finding where code is called](https://discourse.julialang.org/t/interpreting-output-of-profile-finding-where-code-is-called/90396)

<div class="topic-metadata">

**Author:** [@renatobellotti](https://discourse.julialang.org/u/renatobellotti)\
**Replies:** 1\
**Last updated:** [November 17, 2022, 12:04pm UTC](https://discourse.julialang.org/t/interpreting-output-of-profile-finding-where-code-is-called/90396 "2022-11-17T12:04:18Z")

</div>

Dear Julia enthusiasts, I’m currently profiling an optimisation code that relies on Optim.jl and Zygote to calculate the gradients. Interestingly, about half of the runtime seems to be spent on creating and destroying t…

---

## [VSCode profview not showing](https://discourse.julialang.org/t/vscode-profview-not-showing/90189)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 11:36am UTC](https://discourse.julialang.org/t/vscode-profview-not-showing/90189 "2022-11-17T11:36:17Z")

</div>

I used @profview on some code and nothing is shown in the tab. However, I can save the contents to a HTML. When opening it and looking at the developer consoler I see this exception: Uncaught RangeError: Maximum call sta…

---

## [1D adaptive integration of a function with a parameter](https://discourse.julialang.org/t/1d-adaptive-integration-of-a-function-with-a-parameter/90365)

<div class="topic-metadata">

**Author:** [@sylvian\_kahane](https://discourse.julialang.org/u/sylvian_kahane)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 11:29am UTC](https://discourse.julialang.org/t/1d-adaptive-integration-of-a-function-with-a-parameter/90365 "2022-11-17T11:29:03Z")

</div>

The hquadrature (hcubature) does not offer the possibility to transfer arguments to the integrand (like using args=() in scipy.integrate). I have an integrand func(x, E) depending on the independent variable x and on th…

---

## [Random seeds in distributed computing](https://discourse.julialang.org/t/random-seeds-in-distributed-computing/88891)

<div class="topic-metadata">

**Author:** [@renatobellotti](https://discourse.julialang.org/u/renatobellotti)\
**Replies:** 4\
**Last updated:** [November 17, 2022, 11:14am UTC](https://discourse.julialang.org/t/random-seeds-in-distributed-computing/88891 "2022-11-17T11:14:47Z")

</div>

Hi, I’m currently trying to seed my RNG for a distributed code. I have tried this snippet, but it does not run reproducibly: using Distributed using Random # Distributed seeding: # We seed an RNG on the master, then g…

---

## [Batching in Geometric Flux](https://discourse.julialang.org/t/batching-in-geometric-flux/90120)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 6\
**Last updated:** [November 17, 2022, 11:03am UTC](https://discourse.julialang.org/t/batching-in-geometric-flux/90120 "2022-11-17T11:03:57Z")

</div>

Hi, can anyone shed me a light on how minibatching in GeometricFlux works? Particularly I am interested in running minibatch on a set of graphs with different edge matrices. Thanks for an answer, Tomas

---

## [Lines connecting data points don't follow order changed by sorter function (AoG)](https://discourse.julialang.org/t/lines-connecting-data-points-dont-follow-order-changed-by-sorter-function-aog/90395)

<div class="topic-metadata">

**Author:** [@ristretti](https://discourse.julialang.org/u/ristretti)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 10:47am UTC](https://discourse.julialang.org/t/lines-connecting-data-points-dont-follow-order-changed-by-sorter-function-aog/90395 "2022-11-17T10:47:57Z")

</div>

Hello everyone =) I am trying to connect data points across a categorical variable on the x axis. With the default order the points are connected as expected (with a line from 1 to 2 and a line from 2 to 3). When i chan…

---

## [Julia ode: Jacobi function does not get called](https://discourse.julialang.org/t/julia-ode-jacobi-function-does-not-get-called/90389)

<div class="topic-metadata">

**Author:** [@c\_sell](https://discourse.julialang.org/u/c_sell)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 10:21am UTC](https://discourse.julialang.org/t/julia-ode-jacobi-function-does-not-get-called/90389 "2022-11-17T10:21:36Z")

</div>

Hello, I have a problem with the following example. It just represents he problem from another code i wrote. I want to use the function f\_jac to supply the jacobian to the ode solver. But somehow the function does not ge…

---

## [Parameter estimation with norm vs. norm-squared loss](https://discourse.julialang.org/t/parameter-estimation-with-norm-vs-norm-squared-loss/90394)

<div class="topic-metadata">

**Author:** [@fhchl](https://discourse.julialang.org/u/fhchl)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 10:06am UTC](https://discourse.julialang.org/t/parameter-estimation-with-norm-vs-norm-squared-loss/90394 "2022-11-17T10:06:17Z")

</div>

In the SciML book, parameter estimation problems are defined with a loss function that uses the norm of the residual, not the norm-squared as typical in least-squares formulations (see here). Is this a typo or is there m…

---

## [Meshing operations in Julia](https://discourse.julialang.org/t/meshing-operations-in-julia/87609)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [November 17, 2022, 9:20am UTC](https://discourse.julialang.org/t/meshing-operations-in-julia/87609 "2022-11-17T09:20:20Z")

</div>

Is it possible to do following Meshlab operations using Meshes.jl or similar package ? model.meshing\_remove\_connected\_component\_by\_diameter() model.meshing\_remove\_connected\_component\_by\_face\_number() model.meshing\_remov…

---

## [How to correctly create ''slices'' of a column by using indexes of another one, in a DataFrame](https://discourse.julialang.org/t/how-to-correctly-create-slices-of-a-column-by-using-indexes-of-another-one-in-a-dataframe/90245)

<div class="topic-metadata">

**Author:** [@Juan\_Mac\_Donagh](https://discourse.julialang.org/u/Juan_Mac_Donagh)\
**Replies:** 7\
**Last updated:** [November 17, 2022, 8:25am UTC](https://discourse.julialang.org/t/how-to-correctly-create-slices-of-a-column-by-using-indexes-of-another-one-in-a-dataframe/90245 "2022-11-17T08:25:32Z")

</div>

Hi all, I have a question regarding how to correctly solve this: I have a DataFrame that has the following columns: df.i1 = \[\[1,2,3,4,5,1,2\],\[1,2,3,4,5,6,8,10,11\],\[1,2,3,4,5\]\] df.i2 = \[\[4,2,1\],\[3,3,3\],\[1,2,2\]\] And I n…

---

## [Getting this type signature correct](https://discourse.julialang.org/t/getting-this-type-signature-correct/90383)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 3\
**Last updated:** [November 17, 2022, 4:46am UTC](https://discourse.julialang.org/t/getting-this-type-signature-correct/90383 "2022-11-17T04:46:04Z")

</div>

Say I have a function that accepts at least one argument of Union{Int, Colon, OrdinalRange}. I can write this like: function test(i::Union{Int, Colon, OrdinalRange}, I::Union{Int, Colon, OrdinalRange}...) println((i…

---

## [Arpack 0.5.4 broken](https://discourse.julialang.org/t/arpack-0-5-4-broken/90381)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 4:14am UTC](https://discourse.julialang.org/t/arpack-0-5-4-broken/90381 "2022-11-17T04:14:11Z")

</div>

A PA for those who use Arpack: Arpack 0.5.4 for the generalized eigenvalue problem with positive definite sparse matrices and the smallest eigenvalues is broken. The solution converges for 0.5.3 but fails for 0.5.4. Iss…

---

## [Syntax error in parallel computing](https://discourse.julialang.org/t/syntax-error-in-parallel-computing/90378)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 3:20am UTC](https://discourse.julialang.org/t/syntax-error-in-parallel-computing/90378 "2022-11-17T03:20:59Z")

</div>

I’m trying to learn parallel computing using Distributed and I tried the Pi computation as an example: using Distributed addprocs(4) function points\_inside(n) n\_in= 0 for i=1:n x,y= rand(), rand() …

---

## [Special environment for testing?](https://discourse.julialang.org/t/special-environment-for-testing/90306)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 9\
**Last updated:** [November 17, 2022, 2:51am UTC](https://discourse.julialang.org/t/special-environment-for-testing/90306 "2022-11-17T02:51:29Z")

</div>

In order to test a package, I would like to use a test environment which would include many other packages, on which the tested package does not depend. I think it should be possible to have an ad hoc environment in the …

[Previous page](https://discourse.julialang.org/latest.md?page=860)

[Next page](https://discourse.julialang.org/latest.md?page=862)
