# Latest

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

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

**Page:** 612

---

## [How to reset camera in Makie/GLMakie](https://discourse.julialang.org/t/how-to-reset-camera-in-makie-glmakie/103220)

<div class="topic-metadata">

**Author:** [@tgf314](https://discourse.julialang.org/u/tgf314)\
**Replies:** 2\
**Last updated:** [August 26, 2023, 3:59pm UTC](https://discourse.julialang.org/t/how-to-reset-camera-in-makie-glmakie/103220 "2023-08-26T15:59:35Z")

</div>

Specifically I am plotting an image on an Axis using image!. I can can zoom and pan with mouse but I want to create a function to reset the camera to its initial state. What is a good way to do that ?

---

## [Making Float16 LU better in generic\_lu.jl](https://discourse.julialang.org/t/making-float16-lu-better-in-generic-lu-jl/102612)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 3\
**Last updated:** [August 26, 2023, 3:11pm UTC](https://discourse.julialang.org/t/making-float16-lu-better-in-generic-lu-jl/102612 "2023-08-26T15:11:18Z")

</div>

I finally stumbled across generic\_lufact! here. This seems to be where Float16 goes to die. I made a copy and threaded the critical loop and things got a lot better for half precision work on my Mac. Threading this fun…

---

## [Private and protected attributes in OOP](https://discourse.julialang.org/t/private-and-protected-attributes-in-oop/103104)

<div class="topic-metadata">

**Author:** [@ahmed-desoki](https://discourse.julialang.org/u/ahmed-desoki)\
**Replies:** 8\
**Last updated:** [August 26, 2023, 2:47pm UTC](https://discourse.julialang.org/t/private-and-protected-attributes-in-oop/103104 "2023-08-26T14:47:05Z")

</div>

Dear folks I want to switch OOP from C++ to Julia. Please guide what is the Julia way of OOP? In OOP in C++, classes can have member variables, or properties. These properties can have attributes like “private” or “pro…

---

## [Faster way for matrix multiplication including a Hermitian matrix with special properties](https://discourse.julialang.org/t/faster-way-for-matrix-multiplication-including-a-hermitian-matrix-with-special-properties/103177)

<div class="topic-metadata">

**Author:** [@ahmed](https://discourse.julialang.org/u/ahmed)\
**Replies:** 6\
**Last updated:** [August 26, 2023, 2:38pm UTC](https://discourse.julialang.org/t/faster-way-for-matrix-multiplication-including-a-hermitian-matrix-with-special-properties/103177 "2023-08-26T14:38:40Z")

</div>

I have a simple question that I hope can make certain kinds of matrix multiplications faster in my code. Is there a way to make use of matrix multiplications that are of the form phi\*P\*adjoint(phi) to make the computati…

---

## [How to perform GPU overlap operations on the custom kernel function?](https://discourse.julialang.org/t/how-to-perform-gpu-overlap-operations-on-the-custom-kernel-function/102855)

<div class="topic-metadata">

**Author:** [@fred\_wu](https://discourse.julialang.org/u/fred_wu)\
**Replies:** 8\
**Last updated:** [August 26, 2023, 9:23am UTC](https://discourse.julialang.org/t/how-to-perform-gpu-overlap-operations-on-the-custom-kernel-function/102855 "2023-08-26T09:23:21Z")

</div>

Hi, I’m trying to use different GPU kernels for overlapping operations because a single kernel usually cannot fully utilize GPU hardware resources. I defined a kernel function and tried the following, but the running ti…

---

## [Wrong links to the Statistics standard library](https://discourse.julialang.org/t/wrong-links-to-the-statistics-standard-library/103009)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 4\
**Last updated:** [August 26, 2023, 9:14am UTC](https://discourse.julialang.org/t/wrong-links-to-the-statistics-standard-library/103009 "2023-08-26T09:14:42Z")

</div>

It seems like the all code source links in the Julia manual for the Statistics module have changed, none of them works. For example for the first one Statistics.std this link does not work. Not even here is possible to …

---

## [Universal Time vs UTC Time in Dates](https://discourse.julialang.org/t/universal-time-vs-utc-time-in-dates/103204)

<div class="topic-metadata">

**Author:** [@barrettp](https://discourse.julialang.org/u/barrettp)\
**Replies:** 11\
**Last updated:** [August 26, 2023, 9:03am UTC](https://discourse.julialang.org/t/universal-time-vs-utc-time-in-dates/103204 "2023-08-26T09:03:26Z")

</div>

Are you sure you mean UT/UT1 and not UTC, because all computer clocks are synchronized using NTP which uses UTC as its time standard. So when you ask the computer for the date you are getting UTC, not UT1. Does that mea…

---

## [The repetition of results](https://discourse.julialang.org/t/the-repetition-of-results/103026)

<div class="topic-metadata">

**Author:** [@R0033h](https://discourse.julialang.org/u/R0033h)\
**Replies:** 4\
**Last updated:** [August 26, 2023, 8:47am UTC](https://discourse.julialang.org/t/the-repetition-of-results/103026 "2023-08-26T08:47:14Z")

</div>

I am encountering issues with the repetition of results in this code (in the terminal) I saw each result 4 times. May the problem i used the same sorted\_dic i am not sure. I wrote for q in 1:4 # number of school sta…

---

## [Changing the system size over time in ModellingToolkit](https://discourse.julialang.org/t/changing-the-system-size-over-time-in-modellingtoolkit/103100)

<div class="topic-metadata">

**Author:** [@evan-wehi](https://discourse.julialang.org/u/evan-wehi)\
**Replies:** 3\
**Last updated:** [August 26, 2023, 8:06am UTC](https://discourse.julialang.org/t/changing-the-system-size-over-time-in-modellingtoolkit/103100 "2023-08-26T08:06:04Z")

</div>

I apologise if this is answered in the documentation but I couldn’t find it. I’m modelling a population of biological cells which divide and die over time. These events can be triggered by continious callbacks for examp…

---

## [Extract Turing model to LogDensityProblems and transform variables](https://discourse.julialang.org/t/extract-turing-model-to-logdensityproblems-and-transform-variables/103201)

<div class="topic-metadata">

**Author:** [@YuvalBernard](https://discourse.julialang.org/u/YuvalBernard)\
**Replies:** 2\
**Last updated:** [August 26, 2023, 7:46am UTC](https://discourse.julialang.org/t/extract-turing-model-to-logdensityproblems-and-transform-variables/103201 "2023-08-26T07:46:57Z")

</div>

Hi all, As some sort of continuation of Recommended way to extract logprob and build gradients in Turing.jl? I wish to extract the log probability density from a Turing model (to use with Pathfider.jl for example), an…

---

## [How to canonically load and run user-provided functions from a file?](https://discourse.julialang.org/t/how-to-canonically-load-and-run-user-provided-functions-from-a-file/103180)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 2\
**Last updated:** [August 26, 2023, 6:06am UTC](https://discourse.julialang.org/t/how-to-canonically-load-and-run-user-provided-functions-from-a-file/103180 "2023-08-26T06:06:39Z")

</div>

Let’s consider a Julia package OurPackage.jl that creates a long-running process. In this process, from time to time we want to load a user-provided file and execute a function implemented in it. For example, the user wo…

---

## [Why is inplace addition to array slice allocating?](https://discourse.julialang.org/t/why-is-inplace-addition-to-array-slice-allocating/103214)

<div class="topic-metadata">

**Author:** [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)\
**Replies:** 2\
**Last updated:** [August 26, 2023, 3:18am UTC](https://discourse.julialang.org/t/why-is-inplace-addition-to-array-slice-allocating/103214 "2023-08-26T03:18:44Z")

</div>

I found an allocation in my code I wasn’t expecting. It happens when I do inplace addition .+= to a slice of an array. Consider the following: foo = zeros(3,3,3) function test1(foo) foo\[1,:,1\] .+= 2 return noth…

---

## [Enable all functions to work on element of new type](https://discourse.julialang.org/t/enable-all-functions-to-work-on-element-of-new-type/103210)

<div class="topic-metadata">

**Author:** [@s-baumann](https://discourse.julialang.org/u/s-baumann)\
**Replies:** 2\
**Last updated:** [August 25, 2023, 11:09pm UTC](https://discourse.julialang.org/t/enable-all-functions-to-work-on-element-of-new-type/103210 "2023-08-25T23:09:54Z")

</div>

If I make a new struct that contains a certain type (a DataFrame in below example) like: struct StructContainingDataFrame df::DataFrame something\_else::Any end Is it then possible to make this work with all fun…

---

## [How to hide a type parameter?](https://discourse.julialang.org/t/how-to-hide-a-type-parameter/103187)

<div class="topic-metadata">

**Author:** [@ColinCaine](https://discourse.julialang.org/u/ColinCaine)\
**Replies:** 4\
**Last updated:** [August 25, 2023, 9:59pm UTC](https://discourse.julialang.org/t/how-to-hide-a-type-parameter/103187 "2023-08-25T21:59:51Z")

</div>

It’s not a big deal, but I’d kinda like to hide a type parameter of a struct. The value of this parameter is determined from the value of the other parameters. Here’s a small example including working and unexpectedly b…

---

## [Why is it so complicated to access a row in a DataFrame?](https://discourse.julialang.org/t/why-is-it-so-complicated-to-access-a-row-in-a-dataframe/103162)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 12\
**Last updated:** [August 25, 2023, 9:25pm UTC](https://discourse.julialang.org/t/why-is-it-so-complicated-to-access-a-row-in-a-dataframe/103162 "2023-08-25T21:25:43Z")

</div>

Hello, This question has already been asked several times (here for example How to set a index in Julia's DataFrame? - Stack Overflow) but I still don’t understand why DataFrame.jl doesn’t have an index\_col parameter li…

---

## [Finite hlines in Plot? Plots.jl](https://discourse.julialang.org/t/finite-hlines-in-plot-plots-jl/103189)

<div class="topic-metadata">

**Author:** [@abehersan](https://discourse.julialang.org/u/abehersan)\
**Replies:** 1\
**Last updated:** [August 25, 2023, 9:19pm UTC](https://discourse.julialang.org/t/finite-hlines-in-plot-plots-jl/103189 "2023-08-25T21:19:03Z")

</div>

Is there a function similar to hline! but defined only over a finite x-range? I.e. something like: hline!(\[3\], \[-1, 0\]) Where a line would be plotted at y=3 from x=-1 to x=0. I am aware this can be done simply by plot…

---

## [Why does GPU addition slows down as the array get larger compared to other methods?](https://discourse.julialang.org/t/why-does-gpu-addition-slows-down-as-the-array-get-larger-compared-to-other-methods/103122)

<div class="topic-metadata">

**Author:** [@Reza-Reza](https://discourse.julialang.org/u/Reza-Reza)\
**Replies:** 7\
**Last updated:** [August 25, 2023, 8:53pm UTC](https://discourse.julialang.org/t/why-does-gpu-addition-slows-down-as-the-array-get-larger-compared-to-other-methods/103122 "2023-08-25T20:53:42Z")

</div>

Consider the three functions below which add two arrays sequentially, using threads, and using GPU: using BenchmarkTools using CUDA function sequential\_add!(y, x) for i in eachindex(y, x) @inbounds y\[i\] += …

---

## [Help with creating binaries](https://discourse.julialang.org/t/help-with-creating-binaries/103142)

<div class="topic-metadata">

**Author:** [@Rajender\_Mudigonda](https://discourse.julialang.org/u/Rajender_Mudigonda)\
**Replies:** 1\
**Last updated:** [August 25, 2023, 8:47pm UTC](https://discourse.julialang.org/t/help-with-creating-binaries/103142 "2023-08-25T20:47:55Z")

</div>

HI I am trying to create binary for the jl package… by wrapping in a c code, and loading a custom sysimage… using gcc -DJULIAC\_PROGRAM\_LIBNAME="taxpayer.so" -D\_WIN32 -o MyApp MyApp.c taxpayer.so -O2 -fPIE -I"E:/Program…

---

## [How to get a matrix anti-diagonal?](https://discourse.julialang.org/t/how-to-get-a-matrix-anti-diagonal/103202)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 6\
**Last updated:** [August 25, 2023, 7:49pm UTC](https://discourse.julialang.org/t/how-to-get-a-matrix-anti-diagonal/103202 "2023-08-25T19:49:01Z")

</div>

Hello, good afternoon. How to get an offdiagonal from a square matrix? I have diag function for the diagonal but how to acquire the below? A = \[1 2; 3 4\] offd(A) result -\> \[2, 3\]

---

## [How to split initial conditions across multiple timesteps](https://discourse.julialang.org/t/how-to-split-initial-conditions-across-multiple-timesteps/103199)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 1\
**Last updated:** [August 25, 2023, 7:07pm UTC](https://discourse.julialang.org/t/how-to-split-initial-conditions-across-multiple-timesteps/103199 "2023-08-25T19:07:06Z")

</div>

I have a differential equation ddf = f/x^2 - df/x - k\*f^2/x and I’d know f(0) = 0 and df(1) = 1. How can I tell DifferentialEquations.jl about those initial conditions?

---

## [Saving Simulation and Truncating Values in Memory](https://discourse.julialang.org/t/saving-simulation-and-truncating-values-in-memory/103095)

<div class="topic-metadata">

**Author:** [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Replies:** 4\
**Last updated:** [August 25, 2023, 6:42pm UTC](https://discourse.julialang.org/t/saving-simulation-and-truncating-values-in-memory/103095 "2023-08-25T18:42:29Z")

</div>

I have a long simulation. I’m trying to find a way to save the values of my simulation to disk and truncate the values held in memory. My guess is to use a callback. So far I have: using MAT function save\_and\_clea…

---

## [Single-color 3D surface plot](https://discourse.julialang.org/t/single-color-3d-surface-plot/103166)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 10\
**Last updated:** [August 25, 2023, 6:01pm UTC](https://discourse.julialang.org/t/single-color-3d-surface-plot/103166 "2023-08-25T18:01:28Z")

</div>

I’m trying to plot a 3D surface as a single, semi-transparent color. Here’s what I’ve tried: using PlotlyJS f(x, y) = 10 .\* sin.(x./5) .+ 8 .\* cos.(y./7) .+ y./30; xs = ys = 0:1:100; zs = f.(xs', ys); plot(surface(x=…

---

## [List files in a directory, meeting certain conditions](https://discourse.julialang.org/t/list-files-in-a-directory-meeting-certain-conditions/103197)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 2\
**Last updated:** [August 25, 2023, 5:50pm UTC](https://discourse.julialang.org/t/list-files-in-a-directory-meeting-certain-conditions/103197 "2023-08-25T17:50:40Z")

</div>

In MATLAB, I can list all the files in a directory like this: f = dir('/Users/myname/path'); and I can limit results to the files that meet certain conditions like this: f = dir('/Users/myname/path/StartsWith\*.txt');…

---

## [Help on how to describe a Matrix used for 2D Finite Differences using BlockBandedMatrices.jl](https://discourse.julialang.org/t/help-on-how-to-describe-a-matrix-used-for-2d-finite-differences-using-blockbandedmatrices-jl/103086)

<div class="topic-metadata">

**Author:** [@Tomusz](https://discourse.julialang.org/u/Tomusz)\
**Replies:** 9\
**Last updated:** [August 25, 2023, 5:48pm UTC](https://discourse.julialang.org/t/help-on-how-to-describe-a-matrix-used-for-2d-finite-differences-using-blockbandedmatrices-jl/103086 "2023-08-25T17:48:46Z")

</div>

Some context I’m dealing with the solution of a Poisson Equation with structure: ∇ψ\[i, j\] = -ω\[i,j\] =\> (∂²ψ/∂x² + ∂²ψ/∂y²) = -ω\[i,j\] To represent the LHS, i’m using a Matrix that contains the coefficients used to calc…

---

## [Multithreaded LIBSVM and XGBoost crashing](https://discourse.julialang.org/t/multithreaded-libsvm-and-xgboost-crashing/103179)

<div class="topic-metadata">

**Author:** [@dbass](https://discourse.julialang.org/u/dbass)\
**Replies:** 7\
**Last updated:** [August 25, 2023, 5:02pm UTC](https://discourse.julialang.org/t/multithreaded-libsvm-and-xgboost-crashing/103179 "2023-08-25T17:02:34Z")

</div>

Hello, I would like to perform crossvalidation and grid search using SVM (and XGBoost), using a parameter grid defined for each method. In MATLAB, within each split, I can run parfor, and each thread will train some mo…

---

## [Callback based PDE BC mutation](https://discourse.julialang.org/t/callback-based-pde-bc-mutation/103194)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 1\
**Last updated:** [August 25, 2023, 4:12pm UTC](https://discourse.julialang.org/t/callback-based-pde-bc-mutation/103194 "2023-08-25T16:12:54Z")

</div>

I’ve been trying to figure out how to pass time dependent boundary conditions into MethodOfLines advection/diffusion/reaction problems so I can mutate them during parameter optimization without having to rediscretize the…

---

## [Creating a sparse array with JuMP.QuadExpr elements](https://discourse.julialang.org/t/creating-a-sparse-array-with-jump-quadexpr-elements/103171)

<div class="topic-metadata">

**Author:** [@JPG](https://discourse.julialang.org/u/JPG)\
**Replies:** 2\
**Last updated:** [August 25, 2023, 3:58pm UTC](https://discourse.julialang.org/t/creating-a-sparse-array-with-jump-quadexpr-elements/103171 "2023-08-25T15:58:46Z")

</div>

Hello all, I’m very new to Julia and basically I want to define an empty sparse matrix of N x N and fill it up at certain points in the diagonal with just JuMP.QuadExpr elements. I know I can do: A = spzeros(N, N) but …

---

## [Callback for Mass-Matrix Differential-Algebraic Equations (DAEs) differentialequations.jl](https://discourse.julialang.org/t/callback-for-mass-matrix-differential-algebraic-equations-daes-differentialequations-jl/103193)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 6\
**Last updated:** [August 25, 2023, 3:44pm UTC](https://discourse.julialang.org/t/callback-for-mass-matrix-differential-algebraic-equations-daes-differentialequations-jl/103193 "2023-08-25T15:44:34Z")

</div>

Hello How can do I use callback for mass matrix DAE? I tried using callback and got the following error Without a callback, the system is considered without error (The same callback works for ODE without errors) ERRO…

---

## [\[Workgroup\] JuliaHealth Meeting -- August 25th, 2023](https://discourse.julialang.org/t/workgroup-juliahealth-meeting-august-25th-2023/103085)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 3\
**Last updated:** [August 25, 2023, 3:27pm UTC](https://discourse.julialang.org/t/workgroup-juliahealth-meeting-august-25th-2023/103085 "2023-08-25T15:27:27Z")

</div>

Hi folks! It has been a while and I am happy to say that this Friday (August 25th, 10 - 11AM EST) will be our first regularly scheduled JuliaHealth monthly meeting since JuliaCon! Some announcements to make: If you w…

---

## [R2 in MLJ Machine Learning](https://discourse.julialang.org/t/r2-in-mlj-machine-learning/66310)

<div class="topic-metadata">

**Author:** [@francesco\_renato\_urd](https://discourse.julialang.org/u/francesco_renato_urd)\
**Replies:** 3\
**Last updated:** [August 25, 2023, 3:20pm UTC](https://discourse.julialang.org/t/r2-in-mlj-machine-learning/66310 "2023-08-25T15:20:31Z")

</div>

Hello, I am new to Julia and I am trying to use MLJ, for machine learning work, however I see that this library does not have the R2 metric, does anyone know why? Hugs

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

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