# Latest

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

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

**Page:** 885

---

## [Fastest way to negate some booleans in an array](https://discourse.julialang.org/t/fastest-way-to-negate-some-booleans-in-an-array/89261)

<div class="topic-metadata">

**Author:** [@HMegh](https://discourse.julialang.org/u/HMegh)\
**Replies:** 10\
**Last updated:** [October 26, 2022, 12:28am UTC](https://discourse.julialang.org/t/fastest-way-to-negate-some-booleans-in-an-array/89261 "2022-10-26T00:28:31Z")

</div>

Hi, I am trying to optimize a code for a number theory side project. Currently, I have a large vector of booleans, say A=rand(Bool,10^8) I want to negate all the even-index terms. One possible way that I have found is …

---

## [Optimising an imperfect, high-dimensional simulation with experimental data](https://discourse.julialang.org/t/optimising-an-imperfect-high-dimensional-simulation-with-experimental-data/89234)

<div class="topic-metadata">

**Author:** [@duncan](https://discourse.julialang.org/u/duncan)\
**Replies:** 6\
**Last updated:** [October 26, 2022, 12:00am UTC](https://discourse.julialang.org/t/optimising-an-imperfect-high-dimensional-simulation-with-experimental-data/89234 "2022-10-26T00:00:15Z")

</div>

I have used data from CFD simulations to create a Gaussian process surrogate of a mixing tank. The GP can estimate the reaction rate of the tank given a subset of the operating conditions, e.g. reagent concentration and …

---

## [Symply.jl for getting coefficients for all combination of the variables of a multivariable polynomial](https://discourse.julialang.org/t/symply-jl-for-getting-coefficients-for-all-combination-of-the-variables-of-a-multivariable-polynomial/89091)

<div class="topic-metadata">

**Author:** [@xyli](https://discourse.julialang.org/u/xyli)\
**Replies:** 16\
**Last updated:** [October 25, 2022, 10:01pm UTC](https://discourse.julialang.org/t/symply-jl-for-getting-coefficients-for-all-combination-of-the-variables-of-a-multivariable-polynomial/89091 "2022-10-25T22:01:10Z")

</div>

Dear all, Does anyone know how to get coefficients for ALL combination of the variables of a multivariable polynomial using sympy.jl or other Julia package for symbolic computation? Here is an example from MATLAB, sym…

---

## [Custom error to check stochastic matrix](https://discourse.julialang.org/t/custom-error-to-check-stochastic-matrix/89259)

<div class="topic-metadata">

**Author:** [@ejlongman](https://discourse.julialang.org/u/ejlongman)\
**Replies:** 5\
**Last updated:** [October 25, 2022, 8:46pm UTC](https://discourse.julialang.org/t/custom-error-to-check-stochastic-matrix/89259 "2022-10-25T20:46:54Z")

</div>

I would like to write a function that checks whether the rows of a stochastic matrix sum to 1 and throws an error if they do not. The following code works for a check by hand: sum(mat,dims = 2) But this code does not …

---

## [How can I specify a vector of coupled ODEs symbolically (for use in ModelingToolkit)?](https://discourse.julialang.org/t/how-can-i-specify-a-vector-of-coupled-odes-symbolically-for-use-in-modelingtoolkit/89211)

<div class="topic-metadata">

**Author:** [@yohan](https://discourse.julialang.org/u/yohan)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 8:20pm UTC](https://discourse.julialang.org/t/how-can-i-specify-a-vector-of-coupled-odes-symbolically-for-use-in-modelingtoolkit/89211 "2022-10-25T20:20:38Z")

</div>

I am new to Julia and trying to learn ModelingToolkit. I have looked at the tutorials and they are bit simpler than the use case I have: I would like to implement coupled ODEs for a firing rate-based neuronal network mod…

---

## [Fixing type stability involving functions](https://discourse.julialang.org/t/fixing-type-stability-involving-functions/89258)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 7:48pm UTC](https://discourse.julialang.org/t/fixing-type-stability-involving-functions/89258 "2022-10-25T19:48:46Z")

</div>

I have the following codes using Parameters function spatiotemporal(x, t, a\_coefs::AbstractMatrix, b\_coefs::AbstractMatrix) ns = size(a\_coefs,1) - 1 nt = Int((size(a\_coefs,2) - 1)/2) c = zero(eltype(a\_coe…

---

## [Reduce allocations (increase the running speed) for large scale ODEs (136 equations)](https://discourse.julialang.org/t/reduce-allocations-increase-the-running-speed-for-large-scale-odes-136-equations/89253)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 6:54pm UTC](https://discourse.julialang.org/t/reduce-allocations-increase-the-running-speed-for-large-scale-odes-136-equations/89253 "2022-10-25T18:54:31Z")

</div>

Hi, I am wondering how to improve the speed of large scale ODEs, which includes 136 equations. I already use the staticarray, and for loop instead of broadcast to speed up the program and it’s already 10 times faster tha…

---

## [Can I make indexing an AbstractVector{Float64} return a Float64?](https://discourse.julialang.org/t/can-i-make-indexing-an-abstractvector-float64-return-a-float64/89215)

<div class="topic-metadata">

**Author:** [@chipbuster](https://discourse.julialang.org/u/chipbuster)\
**Replies:** 6\
**Last updated:** [October 25, 2022, 5:18pm UTC](https://discourse.julialang.org/t/can-i-make-indexing-an-abstractvector-float64-return-a-float64/89215 "2022-10-25T17:18:54Z")

</div>

Hey all! I’m trying to create an iterator over an array right now that only returns certain elements. The definition of the type looks something like this (all code will be at the bottom): struct DwellIterAbstract …

---

## [Signal (11): Segmentation fault when launching MATLAB process](https://discourse.julialang.org/t/signal-11-segmentation-fault-when-launching-matlab-process/89250)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 4:54pm UTC](https://discourse.julialang.org/t/signal-11-segmentation-fault-when-launching-matlab-process/89250 "2022-10-25T16:54:08Z")

</div>

I am trying to call MATLAB from julia, but I get a segmentation fault: julia\> using MATLAB │ Package MATLAB not found, but a package named MATLAB is available from a │ registry. │ Install package? │ (@v1.8) pkg\> …

---

## [Can no longer sort in discourse by Replies count](https://discourse.julialang.org/t/can-no-longer-sort-in-discourse-by-replies-count/89205)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 4:41pm UTC](https://discourse.julialang.org/t/can-no-longer-sort-in-discourse-by-replies-count/89205 "2022-10-25T16:41:17Z")

</div>

Within the past month, I am no longer able to sort messages in discourse by the number of replies. Has anyone else seen this? Any ideas for how to fix this? (I used to be able to go to the page of New (2) and click o…

---

## [Minimal self-containing example of code transformation using generated functions?](https://discourse.julialang.org/t/minimal-self-containing-example-of-code-transformation-using-generated-functions/88535)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 4:39pm UTC](https://discourse.julialang.org/t/minimal-self-containing-example-of-code-transformation-using-generated-functions/88535 "2022-10-25T16:39:12Z")

</div>

Cassette, IRTools, Diffractor and others use generated functions to transform a method’s CodeInfo / IRCode. Although I used these tools dozen times, I never managed to understand or reproduce it. Is there a minimal self-…

---

## [How to avoid prefixing module names when using Symbol on struct type in Pluto notebooks?](https://discourse.julialang.org/t/how-to-avoid-prefixing-module-names-when-using-symbol-on-struct-type-in-pluto-notebooks/89227)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 3:50pm UTC](https://discourse.julialang.org/t/how-to-avoid-prefixing-module-names-when-using-symbol-on-struct-type-in-pluto-notebooks/89227 "2022-10-25T15:50:33Z")

</div>

Say there is a type Baz in package Foo’s internal module Bar, Foo.Bar.Baz. Baz is exported by Foo. When I do Symbol in REPL, I have julia\> using Foo julia\> Symbol(Baz) :Baz But when I do the same in Pluto notebook, I h…

---

## [Modify PlotlyJS-Templates](https://discourse.julialang.org/t/modify-plotlyjs-templates/89251)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 3:36pm UTC](https://discourse.julialang.org/t/modify-plotlyjs-templates/89251 "2022-10-25T15:36:10Z")

</div>

In the current documentation for PlotlyJS the description how to modify available Styles/Templates is outdated :frowning: This is a known issue: Style() not defined Based on the information in this thread I experimente…

---

## [VSCode... Jypyter notebooks & ClipChamp](https://discourse.julialang.org/t/vscode-jypyter-notebooks-clipchamp/89241)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 6\
**Last updated:** [October 25, 2022, 3:28pm UTC](https://discourse.julialang.org/t/vscode-jypyter-notebooks-clipchamp/89241 "2022-10-25T15:28:36Z")

</div>

With the latest update of Windows 11, ClipChamp (free MS video editor) is part of Microsoft 365. ClipChamp seems to interact with VSCode and the Jupyter notebook plug-in: Any idea of what is going on?

---

## [MCMC Benchmark](https://discourse.julialang.org/t/mcmc-benchmark/63013)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 14\
**Last updated:** [October 25, 2022, 2:48pm UTC](https://discourse.julialang.org/t/mcmc-benchmark/63013 "2022-10-25T14:48:52Z")

</div>

In MCMC there is always the issue that there are no established benchmarks. C.f. for example machine learning - Performance benchmarks for MCMC - Cross Validated . There are some related efforts in the community, e.g…

---

## [Images.jl loading image produces artifact](https://discourse.julialang.org/t/images-jl-loading-image-produces-artifact/89249)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 4\
**Last updated:** [October 25, 2022, 2:47pm UTC](https://discourse.julialang.org/t/images-jl-loading-image-produces-artifact/89249 "2022-10-25T14:47:13Z")

</div>

I have made an issue (Images.jl issue 1017), but here is a copy of the text in case I can get help faster and/or make a more googlable resource for this problem: The original image looks like this: I then load the i…

---

## [Meetup at Leibniz IPHT in Jena](https://discourse.julialang.org/t/meetup-at-leibniz-ipht-in-jena/80606)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 4\
**Last updated:** [October 25, 2022, 2:12pm UTC](https://discourse.julialang.org/t/meetup-at-leibniz-ipht-in-jena/80606 "2022-10-25T14:12:46Z")

</div>

Dear Julia Enthusiasts in Jena (JEJ), we would like to organize a seminar on Julia Lang and its tools. We are mainly using Julia for microscopy and image processing related tasks. Hence possible talks and topics could b…

---

## [Filtering DataFrame based on two conditions](https://discourse.julialang.org/t/filtering-dataframe-based-on-two-conditions/89248)

<div class="topic-metadata">

**Author:** [@mb96](https://discourse.julialang.org/u/mb96)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 1:23pm UTC](https://discourse.julialang.org/t/filtering-dataframe-based-on-two-conditions/89248 "2022-10-25T13:23:19Z")

</div>

Hi everyone, I am trying to filter a dataset based on two conditions but it does not allow me to do so unless I write an auxiliary function which in my case is now worth it. Is there not a way to do the following in a …

---

## [Font for Plots: subscripts and special symbols in labels](https://discourse.julialang.org/t/font-for-plots-subscripts-and-special-symbols-in-labels/89185)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 6\
**Last updated:** [October 25, 2022, 1:12pm UTC](https://discourse.julialang.org/t/font-for-plots-subscripts-and-special-symbols-in-labels/89185 "2022-10-25T13:12:04Z")

</div>

When I searched this forum, I found a lot of posts about the problem, but I still don’t know answers to my simple question(s). I’m quite satisfied with Julia’s standard 1D graphing functions in the Plots package. Then, …

---

## [Calculating normal to any arbitary surface](https://discourse.julialang.org/t/calculating-normal-to-any-arbitary-surface/89194)

<div class="topic-metadata">

**Author:** [@Jyoti\_Sharma](https://discourse.julialang.org/u/Jyoti_Sharma)\
**Replies:** 7\
**Last updated:** [October 25, 2022, 12:54pm UTC](https://discourse.julialang.org/t/calculating-normal-to-any-arbitary-surface/89194 "2022-10-25T12:54:03Z")

</div>

Hello, I am looking to calculate normal (pointing outwards) at each point of a curve. I want to know if there is any Julia package to perform this action.I am using the Forward gradient package to calculate the gradient…

---

## [Why I can't run datasets from RDatasets packages on my local machine?](https://discourse.julialang.org/t/why-i-cant-run-datasets-from-rdatasets-packages-on-my-local-machine/89245)

<div class="topic-metadata">

**Author:** [@NunoEdgarGub1](https://discourse.julialang.org/u/NunoEdgarGub1)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 12:32pm UTC](https://discourse.julialang.org/t/why-i-cant-run-datasets-from-rdatasets-packages-on-my-local-machine/89245 "2022-10-25T12:32:36Z")

</div>

I am expereincing this error when running RDatasets package: " cannot assign a value to variable Base.sleep from module Main Stacktrace: \[1\] top-level scope @ In\[3\]:2 \[2\] eval @ .\\boot.jl:373 \[inlined\] \[3\] include…

---

## [Thoughts on JAX vs Julia](https://discourse.julialang.org/t/thoughts-on-jax-vs-julia/86463)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 21\
**Last updated:** [October 25, 2022, 11:06am UTC](https://discourse.julialang.org/t/thoughts-on-jax-vs-julia/86463 "2022-10-25T11:06:40Z")

</div>

Hi everyone. I just posted to Forem about my thoughts on using JAX and Julia: I didn’t write it in the post, but I’d highly recommend everyone who hasn’t tried JAX yet to give it a go (and I would say the same to JAX …

---

## [Using Artifacts for test data](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783)

<div class="topic-metadata">

**Author:** [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)\
**Replies:** 4\
**Last updated:** [October 25, 2022, 10:28am UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783 "2022-10-25T10:28:38Z")

</div>

Before 1.5, I’d used Artifacts quite successfully to make a large data set (10’s of MB) available for testing. I don’t want to include the test data in the main package because many users will never use it. The Artifac…

---

## [Where is load-time spent (with skipped precompilation)](https://discourse.julialang.org/t/where-is-load-time-spent-with-skipped-precompilation/89201)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 12:30am UTC](https://discourse.julialang.org/t/where-is-load-time-spent-with-skipped-precompilation/89201 "2022-10-25T00:30:03Z")

</div>

In a new Julia session, I import a custom package of mine: @time @time\_imports using VoltoMapSim which gives \[ Info: Precompiling VoltoMapSim \[f713100b-c48c-421a-b480-5fcb4c589a9e\] \[ Info: Skipping precompilation sinc…

---

## [Output format](https://discourse.julialang.org/t/output-format/89200)

<div class="topic-metadata">

**Author:** [@jrocha](https://discourse.julialang.org/u/jrocha)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 10:29am UTC](https://discourse.julialang.org/t/output-format/89200 "2022-10-25T10:29:59Z")

</div>

|0 | 0.5 | | -0.375 | | 0.5 | Hi, I wonder how can i format the output of columns and also the numbers aligned by the decimal comma. Below some of my output. Thanks in advance. Cheers, |1 | 0.25 | | 0.265625 | | 0.…

---

## [Need Help implementing Large Tensor Factorization in Julia](https://discourse.julialang.org/t/need-help-implementing-large-tensor-factorization-in-julia/89236)

<div class="topic-metadata">

**Author:** [@mj2984](https://discourse.julialang.org/u/mj2984)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 9:32am UTC](https://discourse.julialang.org/t/need-help-implementing-large-tensor-factorization-in-julia/89236 "2022-10-25T09:32:57Z")

</div>

I am looking to implement this paper in Julia : Complex Embeddings for Simple Link Prediction (arxiv.org). I initially tried to set up a Tensor of the size of entity and relations I have and it was too large to fit into …

---

## [GLMakie running on WSLg](https://discourse.julialang.org/t/glmakie-running-on-wslg/89239)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 8:55am UTC](https://discourse.julialang.org/t/glmakie-running-on-wslg/89239 "2022-10-25T08:55:57Z")

</div>

Hello, Tried the following on a whim, thought I’d mention it in passing. After the most recent WSLg \[Windows Subsystem for Linux\] release, GLMakie now compiles, runs, and displays images. Tested with some 2D plots and…

---

## [Difference between ShortStrings.jl and InlineStrings.jl](https://discourse.julialang.org/t/difference-between-shortstrings-jl-and-inlinestrings-jl/89127)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 2\
**Last updated:** [October 25, 2022, 5:18am UTC](https://discourse.julialang.org/t/difference-between-shortstrings-jl-and-inlinestrings-jl/89127 "2022-10-25T05:18:24Z")

</div>

They look similar. What is the difference - when do I want each?

---

## [Extracting indices using findall()](https://discourse.julialang.org/t/extracting-indices-using-findall/89230)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 4\
**Last updated:** [October 25, 2022, 4:40am UTC](https://discourse.julialang.org/t/extracting-indices-using-findall/89230 "2022-10-25T04:40:52Z")

</div>

Hello all, I am trying to extract indices and assign it to a variable, my simple code is as follows ind1 = Vector{Int64}(undef, 4) L = \[0, 0, 0, 0\] z = \[0,1,1,1\] ind1 = map(1:4) do i findall(x-\>x==L, z) end The a…

---

## [JuMP with Mosek against CVX/Yalmip/Mosek API](https://discourse.julialang.org/t/jump-with-mosek-against-cvx-yalmip-mosek-api/89231)

<div class="topic-metadata">

**Author:** [@nkuma](https://discourse.julialang.org/u/nkuma)\
**Replies:** 1\
**Last updated:** [October 25, 2022, 4:16am UTC](https://discourse.julialang.org/t/jump-with-mosek-against-cvx-yalmip-mosek-api/89231 "2022-10-25T04:16:34Z")

</div>

I’m pretty new in Julia and I am interested in using Mosek with JuMP. I have been using Mosek with CVX and Yalmip in Matlab, but ran into some issues with speed. Is there any comparison with these solvers in terms of p…

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

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