How to show scalars as categories with a scalar bar (and how to move labels of an axis to the other side)

Two issues here related to the following plot:

Here is the code I used to plot the figure:
import numpy as np
from vedo import TetMesh, show, screenshot, settings, Picture, buildLUT, Box, \
    Plotter

import time as tm

settings.defaultFont = 'Kanopus'
# settings.useParallelProjection = True # avoid perspective parallax

tet = TetMesh('final_mesh.1.vtk')
# Clone the TetMesh object and threshold it to get the conducotrs
conductor = tet.clone().threshold(name='cell_scalars', above=0, below=4)
cond = conductor.tomesh().lineWidth(2).lineColor([7, 15, 190])

tet.threshold(name='cell_scalars', above=0, below=15)
msh = tet.tomesh().lineWidth(2).lineColor([7, 15, 190])

# Crop the entire mesh
bounds = [503500, 505000, 6414000, 6417000, -1830, 600]
msh.crop(bounds=bounds)

# Crop the conductor mesh
bounds = [503500, 505200, 6414000, 6417000, -1830, 600]
cond.crop(bounds=bounds)

# We need to build a look up table for our color bar
lut = buildLUT([
    (0.0, 'k'),
    (1.0, 'cyan'),
    (2.0, 'skyeblue'),
    (3.0, 'dodgerblue'),
    (4.0, 'blue'),
    (5.0, 'gray'),
    (6.0, 'yellow'),
    (7.0, 'gold'),
    (9.0, 'red'),
    (11.0, 'powderblue'),
    (13.0, 'lime'),
    (15.0, 'seagreen'),
]
)

msh.cmap(lut, 'cell_scalars', on='cells')
# msh.cmap("coolwarm", 'cell_scalars', on='cells')
msh.addScalarBar3D(
    pos=(505800, 6415500, -1830),
    title='Units',
    titleSize=1.5,
    sx=100,
    sy=2000,
    # titleXOffset=,
)
# Create cmap for cond
cond.cmap(lut, 'cell_scalars', on='cells')

axes_opt = dict(
    xtitle='Easting (m)',
    ytitle='Northing (m)',
    ztitle='Elevation (m)',
    xLabelSize=0.015,
    xTitlePosition=0.65,
    yTitlePosition=0.65,
    zTitlePosition=0.65,
    axesLineWidth=4,
    # xrange=msh.xbounds(),
    yrange=msh.ybounds(),
    # zInverted=True,
    xTitleOffset=0.1,
    # zTitleOffset=0.5,
    yzShift=1,
    tipSize=0.,
    # yLabelOffset=0.5,
)

# Set the camera position
plt = Plotter()
plt.camera.SetPosition( [510267.33, 6408661.841, 5262.764] )
plt.camera.SetFocalPoint( [504361.406, 6415247.796, -650.844] )
plt.camera.SetViewUp( [-0.397, 0.39, 0.831] )
plt.camera.SetDistance( 10640.747 )
plt.camera.SetClippingRange( [6131.035, 16343.212] )

size = [3940, 2160]
show(msh, cond, axes=axes_opt, size=size, interactive=True, zoom=1.2)
screenshot('model_mesh_vedo.png')
# npimg = screenshot(returnNumpy=True)
# pic = Picture(npimg)
# pic.crop(left=0.2, right=0.2, top=0.01, bottom=0.01).write('src_obs_refinement_vedo.png')

# from wand import image

# with image.Image(filename='src_obs_refinement_vedo.png') as imag:
#     imag.trim(color=None, fuzz=0)
#     imag.save(filename='src_obs_refinement_vedo_trim.png')

How to show scalar values as categories in the scalar bar. Right now only values are shown. In Paraview, I can show scalars as categories and it seems that I can probably also do that using PyVista.
The 3D axes. The yz axes used to be located at the left of the figure (default) behaviour, but that causes the z-title to be not readable (reversed, something like the below picture). Then, I had to move it to the right side. However, the titles are not moving together with the axes (both the y- and z-axis titles). Also, the labels of the y-axis is located at the left of the axis and seems to be buried under the mesh. I want to simply move them to the right of the axis. So, how to do all of these changes?

The vtk file used to plot the figure:
final_mesh.1.vtk.zip
Thanks in advance for any comments and suggestions!

This could be an improvement..?
You can unpack the Axes object and manipulate its elements like any other object in the scene:
from vedo import TetMesh, show, screenshot, settings, Picture, buildLUT, Box, Plotter, Axes

settings.defaultFont = 'Kanopus'

tet = TetMesh('data/chddem/final_mesh.1.vtk')

# Clone the TetMesh object and threshold it to get the conducotrs
conductor = tet.clone().threshold(name='cell_scalars', above=0, below=4)
cond = conductor.tomesh()#.lineWidth(1).lineColor([7, 15, 190])

tet.threshold(name='cell_scalars', above=0, below=15)
msh = tet.tomesh()#.lineWidth(1).lineColor([7, 15, 190])

# Crop the entire mesh
bounds = [503500, 505000, 6414000, 6417000, -1830, 600]
msh.crop(bounds=bounds)

# Crop the conductor mesh
bounds = [503500, 505200, 6414000, 6417000, -1830, 600]
cond.crop(bounds=bounds)

# We need to build a look up table for our color bar
lut = buildLUT([
    (0.0, 'k'),
    (1.0, 'cyan'),
    (2.0, 'skyeblue'),
    (3.0, 'dodgerblue'),
    (4.0, 'blue'),
    (5.0, 'gray'),
    (6.0, 'yellow'),
    (7.0, 'gold'),
    (9.0, 'red'),
    (11.0, 'powderblue'),
    (13.0, 'lime'),
    (15.0, 'seagreen'),
    ]
)

msh.cmap(lut, 'cell_scalars', on='cells')
msh.addScalarBar3D(
    pos=(505800, 6415500, -1830),
    title='Units',
    titleSize=1.5,
    titleXOffset=1.8,
    sx=100,
    sy=2000,
)

# Create cmap for cond
cond.cmap(lut, 'cell_scalars', on='cells')
group = msh+cond
axes = Axes(group,
            xtitle='Easting (m)',
            ytitle='Northing (m)',
            ztitle='Elevation (m)',
            xTitlePosition=0.65,
            yTitlePosition=0.65,
            zTitlePosition=0.65,
            zTitleOffset=0.04,
            axesLineWidth=3,
            yTitleOffset=-1.22,
            yzShift=1,
            yLabelRotation=90,
            yLabelOffset=-1.5,
            tipSize=0,
            yzGrid=True,
)

# manually move the Z axis back in place
for a in axes.unpack():
    # print(a.name)
    if "zAxis" in a.name or "zM" in a.name or "zN" in a.name or "yzGrid" in a.name:
        xb = group.xbounds()
        a.shift(-(xb[1]-xb[0]), 0, 0)

# Set the camera position
plt = Plotter()

plt.camera.SetPosition( [510267.33, 6408661.841, 5262.764] )
plt.camera.SetFocalPoint( [504361.406, 6415247.796, -650.844] )
plt.camera.SetViewUp( [-0.397, 0.39, 0.831] )
plt.camera.SetDistance( 10640.747 )
plt.camera.SetClippingRange( [6131.035, 16343.212] )

plt.show(msh, cond, axes, size=(1565, 1352), resetcam=0, zoom=1.3)

I could probably add an extra option to move around individual axes instead of axes planes..
About the scalarbar, the categories are not implemented... but shouldn't be difficult to do it.

This is great! The axes are what I want and I think showing a grid makes it even better. I am looking forward to seeing the implementation of the categories. With that, I think vedo surely does all the things that I can do using Paraview but much better and neater!  Thanks very much for your always helpful reply.

Hmm, it's interesting that I cannot get the axes grid showing in my code...

Here is the code I used and I believe it is almost identical to what you used above.
import numpy as np
from vedo import TetMesh, show, screenshot, settings, Picture, buildLUT, Box, \
    Plotter, Axes

settings.defaultFont = 'Kanopus'
# settings.useParallelProjection = True # avoid perspective parallax

tet = TetMesh('final_mesh.1.vtk')
# Clone the TetMesh object and threshold it to get the conducotrs
conductor = tet.clone().threshold(name='cell_scalars', above=0, below=4)
cond = conductor.tomesh().lineWidth(2).lineColor('w')

tet.threshold(name='cell_scalars', above=0, below=15)
msh = tet.tomesh().lineWidth(2).lineColor('w')

# Crop the entire mesh
bounds = [503500, 505000, 6414000, 6417000, -1830, 600]
msh.crop(bounds=bounds)

# Crop the conductor mesh
bounds = [503500, 505200, 6414000, 6417000, -1830, 600]
cond.crop(bounds=bounds)

# We need to build a look up table for our color bar
lut = buildLUT([
    (0.0, 'k'),
    (1.0, 'cyan'),
    (2.0, 'skyblue'),
    (3.0, 'dodgerblue'),
    (4.0, 'blue'),
    (5.0, 'gray'),
    (6.0, 'yellow'),
    (7.0, 'gold'),
    (9.0, 'red'),
    (11.0, 'powderblue'),
    (13.0, 'lime'),
    (15.0, 'seagreen'),
],
               interpolate=False
)

msh.cmap(lut, 'cell_scalars', on='cells')
# msh.cmap("coolwarm", 'cell_scalars', on='cells')
msh.addScalarBar3D(
    pos=(505800, 6415500, -1830),
    title='Units',
    titleSize=1.5,
    sx=100,
    sy=2000,
    # titleXOffset=,
)
# Create cmap for the plot
cond.cmap(lut, 'cell_scalars', on='cells')

# Get an axes object for both msh and cond
group = msh + cond              # First combine the two into one
axes = Axes(group,
            xtitle='Easting (m)',
            ytitle='Northing (m)',
            ztitle='Elevation (m)',
            xLabelSize=0.015,
            xTitlePosition=0.65,
            yTitlePosition=0.65,
            yTitleOffset=-1.22,
            yLabelRotation=90,
            yLabelOffset=-1.5,
            zTitlePosition=0.65,
            zTitleOffset=0.04,
            axesLineWidth=3,
            yrange=msh.ybounds(),
            xTitleOffset=0.1,
            yzShift=1,
            tipSize=0.,
            yzGrid=True,
            xyGrid=True,
            )
# manually move the Z axis back in place
for a in axes.unpack():
    # print(a.name)
    if ("zAxis" in a.name or "zM" in a.name or "zN" in a.name
        or "yzGrid" in a.name):
        xb = group.xbounds()
        a.shift(-(xb[1]-xb[0]), 0, 0)

# Set the camera position
plt = Plotter()
plt.camera.SetPosition([510267.33, 6408661.841, 5262.764])
plt.camera.SetFocalPoint([504361.406, 6415247.796, -650.844])
plt.camera.SetViewUp([-0.397, 0.39, 0.831])
plt.camera.SetDistance(10640.747)
plt.camera.SetClippingRange([6131.035, 16343.212])

size = [3940, 2160]
plt.show(msh, cond, axes, size=size, interactive=True, resetcam=0, zoom=1.2)
screenshot('model_mesh_vedo.png')

I still kept the edges, although that does make the plot a bit messy. And I think the plot I got from Paraview seemingly does a better job in cropping the mesh when the 'crinkle clip' box is ticked. Below is what I got from using Praview (a terrible mess with the axes)

Have you by chance upgraded your mac OS?
Try:
settings.useDepthPeeling=False
the other problem is bacause you cut/crop the polygonal mesh coming from the tets faces, not the original tets.
See example examples/volumetric/tet_cutMesh2.py.

indeed cutting the tets works:

also shrinking the tets is probably giving a better visual result than drawing lines (?)

I have not upgraded my OS but I am probably going to do that this weekend. Got tons of unfinished tasks opened and do not want to close them for now...
settings.useDepthPeeling=False solved the axes grid problem like a charm!
And you are right, I need to cut the TetMesh object rather than the mesh object. And here is what I got

I think changing the edge colors to white makes it slightly better looking. I think it would make people confused if I shrink the tets because they are expecting cells with edges for an Earth model discretized by unstructured emshes for numerical simulation purposes.
Oh, how did you get the scalar bar vertical? I tried to put add vertical=True and it complains that it is not a recognized parameter...
This is getting really cool! Thanks a bunch @marcomusy

Looks great :) you already found how to do it! I was planning to push a new vedo version later which would include a few fixes, including the vertical scalarbar.

Yes. I tried really hard not to ask you for the code. I looked at that example and figured out how to do it by trial-and-error. I am going to try some vector plots later which I used Paraview Catalyst to create the original version. May need to bug you further there...

Here we are... upgrade vedo from the master then:
import vedo

vedo.settings.defaultFont = 'Kanopus'
vedo.settings.multiSamples = 8 # antialiasing

tet = vedo.TetMesh('data/chddem/final_mesh.1.vtk')
conductor = tet.clone().threshold('cell_scalars', above=0, below=4)
tet.threshold('cell_scalars', above=0, below=15)

# Crop the entire mesh
box = vedo.Box(size=[503500, 505000, 6414000, 6417000, -1830, 600])
tet.cutWithMesh(box, wholeCells=True)

# Crop the conductor mesh
box = vedo.Box(size=[503500, 505200, 6414000, 6417000, -1830, 600])
conductor.cutWithMesh(box)

# We need to build a look up table for our color bar
lut_table = [
    #value, color,   alpha, category_label
    ( 0.0, 'black',      1, "\alpha_0"),
    ( 1.0, 'cyan',       1, "\beta_1"),
    ( 2.0, 'skyblue',    1, "\Gamma_2"),
    ( 3.0, 'dodgerblue', 1, "\delta_3"),
    ( 4.0, 'blue',       1, "\epsilon_4"),
    ( 5.0, 'gray',       1, "level^5"),
    ( 6.0, 'yellow',     1, "level^6"),
    ( 7.0, 'gold',       1, "level^7"),
    ( 9.0, 'red',        1, "level^8"),
    (11.0, 'powderblue', 1, "level^9"),
    (13.0, 'lime',       1, "level^10"),
    (15.0, 'seagreen',   1, "level^11"),
]
lut = vedo.buildLUT(lut_table)

msh = tet.tomesh().lw(1).lc('white')
msh.cmap(lut, 'cell_scalars', on='cells')
msh.addScalarBar3D(
            categories=lut_table,
            pos=(505800, 6415500, -1830),
            title='Units',
            titleSize=1.25,
            sx=100,
            sy=2200,
)
# put scalarbar vertical and shift it up a bit
msh.scalarbar.rotateX(90, locally=True).rotateY(45, locally=True).shift(-300,1400,1200)

# Create cmap for cond
cond = conductor.tomesh().cmap(lut, 'cell_scalars', on='cells')

axes = vedo.Axes(msh + cond,
                xtitle='Easting (m)',
                ytitle='Northing (m)',
                ztitle='Elevation (m)',
                xTitlePosition=0.65,
                yTitlePosition=0.65,
                zTitlePosition=0.65,
                zTitleOffset=0.04,
                axesLineWidth=3,
                gridLineWidth=2,
                yTitleOffset=-0.22,
                yShiftAlongX=1,
                yLabelRotation=90,
                yLabelOffset=-1.5,
                tipSize=0,
                yzGrid=True,
                xyGridColor='k',
                xyFrameLine=True,
)

plt = vedo.Plotter(size=(1565, 1350))
plt.camera.SetPosition( [512150.624, 6410616.074, 4432.376] )
plt.camera.SetFocalPoint( [504505.154, 6415331.728, -815.481] )
plt.camera.SetViewUp( [-0.413, 0.29, 0.863] )
plt.camera.SetDistance( 10403.394 )

plt.show(msh, cond, axes, resetcam=False, zoom=1.3)

Let me know if you have any questions. Please star the project if you find it useful and if you publish anything that leverages vedo let us know so we can add it to the list of papers!

Just wonderful! I can now replace the original ugly figure that I included in my manuscript with this fancy one now. I stared the project and will send you the paper later once it is published. I will be returning the revised manuscript next week and am expecting it to be published soon (finally moderate revision this time).
I am actually preparing a presentation for our group meeting tomorrow on this very topic. I will include this fancy picture and the code used to create this in the presentation and I am pretty sure everyone is going to like this. As far as I know, almost everyone in our group needs to use Inkscape to edit figures created using Paraview simply for making better looking axes labels.
Thanks very much.

May cite this as well with
M. Musy et al., "vedo, a python module for scientific analysis and visualization of 3D objects and point clouds", Zenodo, 2021, doi.org/10.5281/zenodo.4287635.

I'm glad you like it ! Keep in mind that you can reshuffle the ordering of colors and labels in scalarbar by chnging the lut_table list (by makiing a copy), if needed.
Thanks for you feedback which helped on improving the package.

Yeah, I definitely like it and I had fun exploring all possibilities by learning from your code.
I have upgraded my code and the category scalar bar works perfectly for me. And guess what! The figures can now be trimmed using wand again!
But, the anti-aliasing seems to be not working by default anymore. I had to manually press Alt-A to get it working. But that is totally acceptable.
I still decided to stick to the horizontal color bar. Here is what my final thing looks like:

Here is what I used to have with Paraview + Inkscape:

At the time of making the above figure, I think I have not figured out Paraview can do the category thing and now I don't even bother to recreate that figure.

cool!

the anti-aliasing seems to be not working by default anymore

so the line settings.multiSamples=8 has no effect?

Sorry, my bad. I forgot to include that line there. But wouldn't it be better just to make that the default behavior?
Also, increasing the gridLineWidth does make the grid lines more visible, which is good. Thanks for pointing this out. I was not even aware of that.

But wouldn't it be better just to make that the default behavior

as vtk9 is quite buggy, making it the default might not be possible. Actually can you try from command line:
vedo -r colorize_volume
try rotating a bit the scene and then press shift-A: does the volume disappear?

Oh, okay, I have no idea about anything related to vtk.
Tried that thing and yep the volume disappeared in no time!

Is there a way to control the size of the labels of a scalar bar? I think I can control the size of the title but there is nothing specifying how large is the label for the scalar bar.

Tried that thing and yep the volume disappeared in no time!

ok, that's a vtk9 bug.. it should not disappear, a added a check to disable antialiasing for volumes scenes on OSX.

Is there a way to control the size of the labels of a scalar bar?

I forgot to add it! In the master version (just pushed it) you can find addScalabar(labelSize=1)

I am not sure how this is supposed to work. But would I be able to get the newest code by using
pip install -U git+https://github.com/marcomusy/vedo.git
Or, should I clone the repository to my computer? Have been using svn forever and don't really know much about Git or Github in general.

yes: pip install -U git+https://github.com/marcomusy/vedo.git
is sufficient to install the dev version. I just pushed it to gihub so you need to redo the pip command above.

The manuscript I mentioned earlier that uses vedo has been accepted for publish. I have finished proofreading and the journal should be able to put the final version up on their website soonish. But here is a link to the paper on the journal's website as of now: https://library.seg.org/doi/10.1190/geo2020-0657.1
I might remember to update the link after the final version appears on the website. The paper cited vedo and acknowledged your help in the end. Once again, thanks for making vedo available to us and for all the help you provided along the way. Hopefully, more people from the geophysics community could see the potential of what vedo can do in plotting all the Earth models when they read my paper.

Congratulations for the publication!
Thanks for using vedo and for the useful feedback!

What an amazing module!
I'm struggling a little bit right now, can the category feature be used in the 2d ScalarBar?
Additionally, is there a list of keystrokes somewhere in the documentation?  The Shift-A advocacy is the first I've heard of this, but I'm very new!
Thank you!

Thanks Phil! At the moment the category feature is limited to scalarbar3d, the 2d one is in my todo list!
About keystrokes you can find them here:
https://vedo.embl.es/autodocs/content/vedo/vedo.html#command-line-interface


Instrument with Opentelemetry

Proposed changes
Uses basic autoinstrumentation of node to get some traces out via OTEL
Pending

See what interesting manual instrumentations could be set up (for example, I want named spans for db queries with stats on query time, etc.
See if we can integrate spans from the actual postgres db, the actual rabbit server, etc
Can we do a distributed trace with the notifier service
How do we get logs out?
How do we get metrics out?

Setup
Rough guide to how this is set up.  If you're trying to run the branch, the code is all there - just skip down to the part where we set up an otel collector and visualizer.
npm install --save @opentelemetry/auto-instrumentations-node
npm install @opentelemetry/sdk-node @opentelemetry/api
Create file at root tracing.mjs
import opentelemetry from "@opentelemetry/sdk-node";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";

// For troubleshooting, set the log level to DiagLogLeve.DEBUG
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO);

const sdk = new opentelemetry.NodeSDK({
  traceExporter: new opentelemetry.tracing.ConsoleSpanExporter(),
  instrumentations: [getNodeAutoInstrumentations()]
});

sdk.start();

export default sdk;

node --import ./tracing.mjs index.mjs
You will get traces in the console
OTLP Exporter
Ref: https://opentelemetry.io/docs/instrumentation/js/exporters/
npm install --save @opentelemetry/exporter-trace-otlp-http
Install the following packages that allow us to add metadata specific to the service to traces
npm install @opentelemetry/resources
npm install @opentelemetry/semantic-conventions

Now the trace.mjs file loox like this:
import opentelemetry from "@opentelemetry/sdk-node";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { Resource } from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";

// For troubleshooting, set the log level to DiagLogLeve.DEBUG
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);

const sdk = new opentelemetry.NodeSDK({
  resource: new Resource({
    [SemanticResourceAttributes.SERVICE_NAME]: 'messenger',
  }),
  // traceExporter: new opentelemetry.tracing.ConsoleSpanExporter(),
  traceExporter: new OTLPTraceExporter({
    // optional: default url is http://localhost:4318/v1/traces
    // url: "<your-otlp-endpoit>/v1/traces",
    // optional: A collection of custom headers to be sent with each request, empty be default
    headers: {}
  }),
  instrumentations: [getNodeAutoInstrumentations({
    // We don't need every pool connection in our traces for now
    '@opentelemetry/instrumentation-pg-pool': {
      enabled: false
    },
    // node apparently does a lot of fs actions behind the scenes which pollute our
    // traces
    '@opentelemetry/instrumentation-fs': {
      enabled: false
    }
  })]
});

sdk.start();

export default sdk;

Now we can see things simply by doing:
docker run -d --name jaeger \
  -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
  -e COLLECTOR_OTLP_ENABLED=true \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 14250:14250 \
  -p 14268:14268 \
  -p 14269:14269 \
  -p 9411:9411 \
  jaegertracing/all-in-one:latest

Then starting the service again:
node --import ./tracing.mjs index.mjs
Then heading to http://localhost:16686/ in the browser, selecting the service.
Now let's try it with signoz.  Jaeger is fine but also not super interesting.
Signoz tool some fiddling,  I had to add platform: linux/amd64 to all the images in the docker compose to get it to run
https://signoz.io/docs/install/docker/
Looks a lot better, but requires some (relatively painless) login up front.
Also includes some services which might be a demo thing but a little distracting.

This branch was exploratory, closing


Front-end of TestData Generator does not support list of source and destination

According to GS1 standard we need to have multiple source and destination in an event

This issue has been fixed and currently available within the feature branch of the project: fixing_issues_based_on_testing.
Will inform again after fixing other issues to test all the issues again together.


Unknown prop Requestclose

Problem description

Link to minimal working code that reproduces the issue
Drawer:
<Drawer         className={className}         classes={{           paper: classes.paper,         }}         open={this.props.open}         onRequestClose={onRequestClose}         docked={docked}         {...other}       >
Versions

Material-UI: v1 beta 3

Is this fixed, I see that you merged it to v1 branch. Fix will be live with beta 4?

Yes, it will be live with v1.0.0-beta.4.


Poor performance for WMAgents with MariaDB 10.6.x backend

Impact of the bug
FNAL WMAgents (mostly submit6 though)
Describe the bug
It's been a few weeks that we get notifications from the P&R team reporting issues - mostly heartbeat - with some agent components. The main one is CleanCouchPoller, which is basically getting stuck while executing a DAO, as reported here https://github.com/dmwm/WMCore/issues/11162
Today we have more heartbeat alerts, this time for the DBS3Upload and RucioInjector. Looking at their component log, I see the component is stuck at the very beginning of the algorithm, e.g.:
2022-05-26 14:56:14,903:140337774409472:INFO:DBSUploadPoller:Starting the DBSUpload Polling Cycle

or
2022-05-26 11:32:56,011:140259166758656:INFO:BaseWorkerThread:RucioInjectorPoller took 54766.109 secs to execute
2022-05-26 11:37:57,483:140259166758656:INFO:RucioInjectorPoller:Running Rucio injector poller algorithm...

How to reproduce it
Probably very hard to do so, only with production-like load.
Expected behavior
We have two FNAL agents up & running. First is submit7, which seems to be fully functional; second is submit6, which has some components working properly, but every now and then with components not being able to fetch data from the relational database, thus getting stuck and raising heartbeat alerts.
We need to investigate and understand what is happening here. Some questions that come to my mind are:

why it only happens on submit6 and not on submit7 (they have the same hardware and a very similar workload at the moment)?
where exactly the component(s) execution is getting stuck?
why it's getting stuck?
are there errors in MariaDB logs?
can we get MariaDB statistics? any monitoring-like information?
and we should probably evaluate our configuration with what is recommended in MariaDB 10.6 and tweak it such that it delivers the performance and scalability that we need.

Additional context and error message
More information and requests might get added to this issue as we start investigating things.

See this specific problem (from the MariaDB new version) as well: https://github.com/dmwm/WMCore/issues/11162

MariaDB seems to be performing much better since the migration to Alma9 nodes (followed by MariaDB 10.6.19). So, I am closing this one out as "not planned" anymore


Fix: rotation as an admin

TLDR; This solution is, in terms of agile methodology, what give us more value to solve the issue we have been having on the admin view related to the rotation which right now is not functional.

Problem
Previously, when an admin wants to rotate a robot, they use the wheel from mouse. But doing that, they are triggering the scrolling as well, which make the rotation not functional in the admin view.
Options
To solve this, we have 2 options: A) simulate the rotation system we already have in the user view. B) Block the scrolling when we are using the mouse wheel hover the robot on admin view.
Evaluation
About the option A, it looks like a good option however we have a situation there. And the thing is that in the admin view we have the "positioning of robots" feature, which is triggering with the onClick event on the robot, and the rotation system we have in User view uses 'pointer up' and 'pointer down' events. Pointer events includes click events as well, what means that using the system we have been using on User view will interact with the positioning feature we have in admin view.
We can solve this giving different trigger to the rotation action as for example the double click event. But it also mean we have to think in other option to do the same behavior for admin but in a mobile view, because double click does not exist in that context.
In other hand, about option B, we already have a hook that allow us to block/allow the scroll whenever we want. The only thing pending there is to add proper events to trigger the desired action.
Decision
Taking in consideration the problem, which is the not functionality of the rotation in the admin view, and the amount of work required for each possible solution, I decided to implement option B and evaluate with the team if there is any specific value adding rotation as is on user view on the admin view.

Blocking the scroll while using the scroll wheel on the robot is a good solution for this PR, however note that the scroll wheel is not available on mobile devices, so admins using iPads will need a different way to rotate the robot.
I like the idea of using "double click" to select a robot to be able to change its location.


zoneminder 1.36.x - runstate active non recognized

With 1.36 version developer have fixed states IsActive property becoming it to int (no more string) so run_state.py has to be changed at line 31
Old:
if int(state["Id"]) == self._state_id:
# yes, the ZM API uses the string "1" for this...
return state["IsActive"] == "1"
New:
if int(state["Id"]) == self._state_id:
return state["IsActive"] == 1

@rohankapoorcom once merged, can we please get a release version bump so we can increment the HA package deps ?

fixed in v0.5.3


Outdated SDK

When using Microsoft Bot Framework Channel Emulator it says
[14:00:03] Warning: The bot is using an SDK version earlier than 3.11.0.
[14:00:03] Warning: SDK versions earlier than 3.11.0 use an authentication configuration that will no longer work with the emulator after November 15, 2017.
[14:00:03] Warning: For your bot to continue working with the emulator, please update your bot to use an SDK version greater than or equal to 3.11.0.
[14:00:03] Read about the Bot Framework authentication change.
[14:00:04] Warning: The latest bot SDK version is 3.11.0.
[14:00:04] Warning: Consider upgrading the bot to the latest SDK version.

https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-authentication

Also by the way there doesn't seem to be implemented proper JWT validation, like keys aren't checked at all.

JWT validation is a known issue see #1


Please redesign toolbar for dark theme

VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:32:36.026Z)
OS Version: Windows_NT ia32 6.3.9600
Extensions:
Extension|Author (truncated)|Version

Hi,
I use dark theme like "Monokai" and I have idea to redesign top toolbar.
Current toolbar:

Idea 1:
This is good because line of (File, Edit, Selection & ...) move to top.
Top color change from blue to dark.

Idea 2:
Top color change from blue to dark.

Thank you

@chrisdias Please check this.


chore(imporoved-valdiations-and-spacing-in-cells): Added Vlaidations in different components, improvded spacing in cell and added wide mode option in settings

Hey Priya, please resolve conflicts here


Add support for empty dataframes

Fixes #5761

modifies _repr_data to return special repr for empty dataframes

adds a test that tries to print empty dataframe

[x] Tests added / passed

[x] Passes black dask / flake8 dask

Thanks @exemplary-citizen!


[WebExt] General APIs, Fx 74 tasks

Trello
https://trello.com/c/hNQnoIAW/114-general-api-enhancements-fx-74
Acceptance criteria

[ ] make webrequest urlclassification a part of the public api

[x] Allow commands.update() to un-set a shortcut, disabling the command

@chrisdavidmills commands.update() is done, urlClassification I'm waiting on one clarification for the MDN text (which is otherwise all done) and merging of the compatibility data. Release notes are updated for both

@chrisdavidmills Got confirmation from Shane Caraveo regarding removal of socialtracking flag, this completes "make webrequest urlclassification a part of the public api"


Remove Tag Hardcoded display names and descriptions

The presentation of tags for the email settings page should no longer be hard coded. The /tag/list api call should contain display_name and description. The hardcoded area is:
https://github.com/lbryio/lbry.io/blob/5cb04332c2179209d0ddbee361c576436319871b/controller/action/MailActions.class.php#L79-L121

duplicate of #1090


Fix up file paths in the DFP README

This is to account for the changes done during DFP refactoring

/ok to test

/merge


Array API failures with Metal Performance Shaders/torch

With latest main branch on an ARM mac SCIPY_DEVICE=mps python dev.py -n test -j 16 -b all results in 189 failures.
Some of the failures will be hard/impossible to avoid because torch doesn't support all ops on that device just yet. However, many of the failures do look avoidable given TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead. is probably something that could be shimmed around in some places perhaps.

  Short test summary info only for now
===================================================================================== short test summary info =====================================================================================
FAILED scipy/_lib/tests/test__util.py::TestContainsNaNTest::test_array_api[propagate-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test__util.py::TestContainsNaNTest::test_array_api[omit-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test__util.py::TestContainsNaNTest::test_array_api[raise-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_identity[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_fft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_ifft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_rfft[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_irfft[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_hfft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_ihfft[torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_all_1d_norm_preserving[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_dtypes_real[float32-torch] - AssertionError: Tensor-likes are not close!
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_dtypes_real[float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_basic.py::TestFFT1D::test_dtypes_complex[complex128-torch] - TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype.
FAILED scipy/fft/tests/test_basic.py::TestFFTThreadSafe::test_fft[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_agrees_with_fftlog[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64-0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[64--0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63-0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-0.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-0.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1-1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1--1.0-True-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_identity[63--0.1--1.0-False-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_special_cases[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_exact[64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_fftlog.py::test_fht_exact[63-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_helper.py::TestFFTFreq::test_definition[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/fft/tests/test_helper.py::TestRFFTFreq::test_definition[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test__util.py::TestLazywhere::test_basic[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test_array_api.py::TestArrayAPI::test_strict_checks[shape0-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/_lib/tests/test_array_api.py::TestArrayAPI::test_strict_checks[shape1-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMLabLinkageConversion::test_mlab_linkage_conversion_empty[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestNumObsLinkage::test_num_obs_linkage_1x4[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestNumObsLinkage::test_num_obs_linkage_2x4[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMaxInconsts::test_maxinconsts_difrow_linkage[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMaxRStat::test_maxRstat_invalid_index[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/cluster/tests/test_hierarchy.py::TestMaxRStat::test_maxRstat_difrow_linkage[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args4-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/cluster/tests/test_hierarchy.py::test_euclidean_linkage_value_error[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args0-torch] - NotImplementedError: The operator 'aten::special_log_ndtr.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this...
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args5-torch] - NotImplementedError: The operator 'aten::i0.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, plea...
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestKstat::test_moments_normal_distribution[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_close[circstd-std-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/constants/tests/test_constants.py::TestConvertTemperature::test_convert_temperature[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_small[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_close[circmean-mean-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args2-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_circfuncs_close[circvar-var-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args6-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_morestats.py::TestCommonAxis::test_axis[case3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_alternative[less-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_alternative[greater-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args7-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_axis_dtype[2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_resampling.py::TestMonteCarloHypothesisTest::test_alternative[two-sided-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args8-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[1-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[2-1-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0--1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[3-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[True-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_constant_moments[1-0-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args9-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_scalar_moment[0-None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_rename_moment_order[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_precision_loss_gh15554[torch] - Failed: DID NOT WARN. No warnings of type (<class 'RuntimeWarning'>,) were emitted.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[None-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_empty[circmean-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[0-0-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-0-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_empty[circvar-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-True-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_morestats.py::TestCircFuncs::test_empty[circstd-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[None-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-True-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None-1-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[0-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_array_api[None--1-3-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[True-False-2-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[0-size1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestSkew::test_vectorization[False-None-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_center_array_moment[1-10-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment_empty_order[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False--1-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::test_chk_asarray[torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestKurtosis::test_vectorization[False-False-0-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_variation.py::TestVariation::test_2d_size_zero_with_axis[1-expected1-torch] - AssertionError: Tensor-likes are not equal!
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args10-torch] - ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args11-torch] - NotImplementedError: The operator 'aten::igammac.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature,...
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args12-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_moment[torch] - AssertionError: Scalars are not equal!
FAILED scipy/stats/tests/test_stats.py::TestMoments::test_constant_moments[0-1-float64-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
FAILED scipy/special/tests/test_support_alternative_backends.py::test_support_alternative_backends[f_name_n_args13-torch] - TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

TypeError: Trying to convert ComplexDouble to the MPS backend but it does not have support for that dtype. might be hard to avoid too.
Using torch 2.3.0.

On the other hand, https://data-apis.org/array-api/latest/API_specification/data_types.html is pretty clear on requiring support for those types, so we'd likely only want to shim around cases where a violation of the standard doesn't occur I suppose.
Test skips could be added with clear explanations if we thought this backend merited it.

I think that guidance in the array API standard may be loosened a bit. However, in SciPy we do require float64 support in order to run tests for the backend. It's just too fundamental for us. float32-only code may work, but supporting that in the test suite would be a lot of churn. We should probably punt on that for now, and document in http://scipy.github.io/devdocs/dev/api-dev/array_api.html that float64 is needed for the test suite to work.

For this test failure SCIPY_DEVICE=mps python dev.py test -t scipy/stats/tests/test_stats.py::TestXP_Var::test_nan_policy -b all I've reported a simple reproducer to torch: https://github.com/pytorch/pytorch/issues/130295
I was about to open a specific issue on the SciPy side because it feels like we're leaning on unspecified NaN sort-order, but it turns out we're allowed to rely on max propagating NaN because the array API says so. This patch allows the test to pass for example, but I don't think we should be compelled to take the performance hit since the standard is clear on this one, albeit as a special behavior at the bottom of the docstring.
--- a/scipy/_lib/_util.py
+++ b/scipy/_lib/_util.py
@@ -736,8 +736,7 @@ def _contains_nan(a, nan_policy='propagate', policies=None, *,
     if xp_size(a) == 0:
         contains_nan = False
     elif inexact:
-        # Faster and less memory-intensive than xp.any(xp.isnan(a))
-        contains_nan = xp.isnan(xp.max(a))
+        contains_nan = xp.any(xp.isnan(a))

On latest main at time of writing with:
SCIPY_DEVICE=mps python dev.py test -t scipy/optimize/tests/test_chandrupatla.py::TestChandrupatlaMinimize::test_vectorization -b pytorch -- -s
I see a hard crash of the pytest suite:

/AppleInternal/Library/BuildRoots/4ff29661-3588-11ef-9513-e2437461156c/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSNDArray/Kernels/MPSNDArrayGatherND.mm:256: failed assertion `Rank of updates array (1) must be greater than or equal to inner-most dimension of indices array (3)'
Fatal Python error: Aborted

Current thread 0x00000001f1c20f40 (most recent call first):
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/torch/utils/_device.py", line 79 in __torch_function__
  File "/Users/treddy/github_projects/scipy/build-install/lib/python3.12/site-packages/scipy/_lib/_array_api.py", line 592 in xp_take_along_axis
  File "/Users/treddy/github_projects/scipy/build-install/lib/python3.12/site-packages/scipy/optimize/_chandrupatla.py", line 414 in _chandrupatla_minimize
  File "/Users/treddy/github_projects/scipy/build-install/lib/python3.12/site-packages/scipy/optimize/_elementwise.py", line 457 in find_minimum
  File "/Users/treddy/github_projects/scipy/build-install/lib/python3.12/site-packages/scipy/optimize/tests/test_chandrupatla.py", line 70 in _chandrupatla_wrapper
  File "/Users/treddy/github_projects/scipy/build-install/lib/python3.12/site-packages/scipy/optimize/tests/test_chandrupatla.py", line 234 in test_vectorization
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/python.py", line 162 in pytest_pyfunc_call
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/python.py", line 1627 in runtest
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/runner.py", line 173 in pytest_runtest_call
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/runner.py", line 241 in <lambda>
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/runner.py", line 341 in from_call
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/runner.py", line 240 in call_and_report
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/runner.py", line 135 in runtestprotocol
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/runner.py", line 116 in pytest_runtest_protocol
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/main.py", line 364 in pytest_runtestloop
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/main.py", line 339 in _main
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/main.py", line 285 in wrap_session
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/main.py", line 332 in pytest_cmdline_main
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/_pytest/config/__init__.py", line 178 in main
  File "/Users/treddy/github_projects/scipy/build-install/lib/python3.12/site-packages/scipy/_lib/_testutils.py", line 127 in __call__
  File "/Users/treddy/github_projects/scipy/dev.py", line 774 in scipy_tests
  File "/Users/treddy/github_projects/scipy/dev.py", line 790 in run
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/action.py", line 461 in execute
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/task.py", line 473 in execute
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/runner.py", line 176 in execute_task
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/runner.py", line 220 in run_tasks
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/runner.py", line 254 in run_all
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/cmd_run.py", line 265 in _execute
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/cmd_base.py", line 570 in execute
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/cmd_base.py", line 150 in parse_execute
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/doit/api.py", line 50 in run_tasks
  File "/Users/treddy/github_projects/scipy/dev.py", line 252 in run_doit_task
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/pydevtool/cli.py", line 267 in callback
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/click/core.py", line 783 in invoke
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/click/core.py", line 1434 in invoke
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/click/core.py", line 1688 in invoke
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/rich_click/rich_command.py", line 152 in main
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/click/core.py", line 1157 in __call__
  File "/Users/treddy/python_venvs/py_312_scipy_dev/lib/python3.12/site-packages/rich_click/rich_command.py", line 367 in __call__
  File "/Users/treddy/github_projects/scipy/dev.py", line 1673 in <module>

Extension modules: psutil._psutil_osx, psutil._psutil_posix, numpy._core._multiarray_umath, numpy.linalg._umath_linalg, cython.cimports.libc.math, scipy._lib._ccallback_c, scipy._lib._fpumode, charset_normalizer.md, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, torch._C, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse, torch._C._special, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_blas, scipy.linalg._matfuncs_expm, scipy.linalg._linalg_pythran, scipy.linalg._decomp_update, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack, scipy.sparse.linalg._propack._zpropack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.optimize._group_columns, scipy._lib.messagestream, scipy.optimize._trlib._trlib, scipy.optimize._lbfgsb, _moduleTNC, scipy.optimize._moduleTNC, scipy.optimize._cobyla, scipy.optimize._slsqp, scipy.optimize._minpack, scipy.optimize._lsq.givens_elimination, scipy.optimize._zeros, scipy.optimize._cython_nnls, scipy.optimize._highs.cython.src._highs_wrapper, scipy.optimize._highs._highs_wrapper, scipy.optimize._highs.cython.src._highs_constants, scipy.optimize._highs._highs_constants, scipy._lib._uarray._uarray, scipy.special._ufuncs_cxx, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.special._ellip_harm_2, scipy.linalg._decomp_interpolative, scipy.optimize._bglu_dense, scipy.optimize._lsap, scipy.spatial._ckdtree, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._distance_wrap, scipy.spatial._hausdorff, scipy.spatial.transform._rotation, scipy.optimize._direct, scipy.integrate._odepack, scipy.integrate._quadpack, scipy.integrate._vode, scipy.integrate._dop, scipy.integrate._lsoda, scipy.interpolate._fitpack, scipy.interpolate._dfitpack, scipy.interpolate._bspl, scipy.interpolate._ppoly, scipy.interpolate.interpnd, scipy.interpolate._rbfinterp_pythran, scipy.interpolate._rgi_cython, scipy.special.cython_special, scipy.stats._stats, scipy.stats._biasedurn, scipy.stats._levy_stable.levyst, scipy.stats._stats_pythran, scipy.stats._ansari_swilk_statistics, scipy.stats._sobol, scipy.stats._qmc_cy, scipy.stats._mvn, scipy.stats._rcont.rcont, scipy.ndimage._nd_image, _ni_label, scipy.ndimage._ni_label (total: 108)

I can extract a crashing torch reproducer:
import torch

device = torch.device("mps:0")
x = torch.tensor([[-5.], [0.], [5.]], device=device)
inds = torch.tensor([[0], [1], [2]], device=device)
torch.take_along_dim(x, inds, 0)

Are we confident this is a torch MPS backend bug, with MPS complaining:
/AppleInternal/Library/BuildRoots/4ff29661-3588-11ef-9513-e2437461156c/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSNDArray/Kernels/MPSNDArrayGatherND.mm:256: failed assertion `Rank of updates array (1) must be greater than or equal to inner-most dimension of indices array (3)'

If so, I'll report upstream if not already on their tracker.

Hmm, take_along_dim isn't in the standard - where do we use that?

git grep -E -i -B 8 -A 5 "take_along_dim"
scipy/_lib/_array_api.py-def xp_take_along_axis(arr: Array,
scipy/_lib/_array_api.py-                       indices: Array, /, *,
scipy/_lib/_array_api.py-                       axis: int = -1,
scipy/_lib/_array_api.py-                       xp: ModuleType | None = None) -> Array:
scipy/_lib/_array_api.py-    # Dispatcher for np.take_along_axis for backends that support it;
scipy/_lib/_array_api.py-    # see data-apis/array-api/pull#816
scipy/_lib/_array_api.py-    xp = array_namespace(arr) if xp is None else xp
scipy/_lib/_array_api.py-    if is_torch(xp):
scipy/_lib/_array_api.py:        return xp.take_along_dim(arr, indices, dim=axis)
scipy/_lib/_array_api.py-    elif is_array_api_strict(xp):
scipy/_lib/_array_api.py-        raise NotImplementedError("Array API standard does not define take_along_axis")
scipy/_lib/_array_api.py-    else:
scipy/_lib/_array_api.py-        return xp.take_along_axis(arr, indices, axis)
scipy/_lib/_array_api.py-

Right, so we are just using the PyTorch API. From the PyTorch docs, I can't see that we're misusing the API, so probably good to open a bug report?

ok, I've provided the reproducer upstream in the cross-linked issue