multipers 2.3.5b2__cp313-cp313-win_amd64.whl → 2.3.5b3__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of multipers might be problematic. Click here for more details.

multipers/slicer.pyx.tp CHANGED
@@ -645,7 +645,6 @@ cdef class {{D['PYTHON_TYPE']}}:
645
645
  str backend:Literal["mpfree", "2pac"]="mpfree",
646
646
  str slicer_backend:Literal["matrix","clement","graph"]="matrix",
647
647
  bool vineyard={{D['IS_VINE']}},
648
- id :Optional[str] = None,
649
648
  dtype = {{D['PY_VALUE_TYPE']}},
650
649
  **minpres_kwargs
651
650
  )->Slicer_type:
@@ -653,7 +652,7 @@ cdef class {{D['PYTHON_TYPE']}}:
653
652
  Computes the minimal presentation of the slicer, and returns it as a new slicer.
654
653
  See :func:`multipers.slicer.minimal_presentation`.
655
654
  """
656
- new_slicer = minimal_presentation(self, degree=degree, degrees=degrees, backend=backend, slicer_backend=slicer_backend, dtype=dtype, vineyard=vineyard, id=id, **minpres_kwargs)
655
+ new_slicer = minimal_presentation(self, degree=degree, degrees=degrees, backend=backend, slicer_backend=slicer_backend, dtype=dtype, vineyard=vineyard, **minpres_kwargs)
657
656
  return new_slicer
658
657
 
659
658
  @property
@@ -858,7 +857,6 @@ def minimal_presentation(
858
857
  str backend:Literal["mpfree", "2pac", ""]="mpfree",
859
858
  str slicer_backend:Literal["matrix","clement","graph"]="matrix",
860
859
  bool vineyard=True,
861
- id :Optional[str] =None,
862
860
  dtype:type|_valid_dtypes=None,
863
861
  int n_jobs = -1,
864
862
  bool force=False,
@@ -870,7 +868,8 @@ def minimal_presentation(
870
868
  and returns it as a slicer.
871
869
  Backends differents than `mpfree` are unstable.
872
870
  """
873
- from multipers.io import _init_external_softwares, input_path, scc_reduce_from_str_to_slicer
871
+ from multipers.io import _init_external_softwares, scc_reduce_from_str_to_slicer
872
+ import tempfile
874
873
  if is_slicer(slicer) and slicer.is_minpres and not force:
875
874
  from warnings import warn
876
875
  warn(f"(unnecessary computation) The slicer seems to be already reduced, from homology of degree {slicer.minpres_degree}.")
@@ -886,24 +885,24 @@ def minimal_presentation(
886
885
  assert degree>=0, f"Degree not provided."
887
886
  if not np.any(slicer.get_dimensions() == degree):
888
887
  return type(slicer)()
889
- if id is None:
890
- id = str(threading.get_native_id())
891
888
  if dtype is None:
892
889
  dtype = slicer.dtype
893
890
  dimension = slicer.dimension - degree # latest = L-1, which is empty, -1 for degree 0, -2 for degree 1 etc.
894
- slicer.to_scc(path=input_path+id, strip_comments=True, degree=degree-1, unsqueeze = False)
895
- new_slicer = multipers.Slicer(None,backend=slicer_backend, vineyard=vineyard, dtype=dtype)
896
- if backend=="mpfree":
897
- shift_dimension=degree-1
898
- else:
899
- shift_dimension=degree
900
- scc_reduce_from_str_to_slicer(path=input_path+id, slicer=new_slicer, dimension=dimension, backend=backend, shift_dimension=shift_dimension, **minpres_kwargs)
901
-
902
- new_slicer.minpres_degree = degree
903
- new_slicer.filtration_grid = slicer.filtration_grid if slicer.is_squeezed else None
904
- if new_slicer.is_squeezed and auto_clean:
905
- new_slicer = new_slicer._clean_filtration_grid()
906
- return new_slicer
891
+ with tempfile.TemporaryDirectory(prefix="multipers") as tmpdir:
892
+ tmp_path = os.path.join(tmpdir, "multipers.scc")
893
+ slicer.to_scc(path=tmp_path, strip_comments=True, degree=degree-1, unsqueeze = False)
894
+ new_slicer = multipers.Slicer(None,backend=slicer_backend, vineyard=vineyard, dtype=dtype)
895
+ if backend=="mpfree":
896
+ shift_dimension=degree-1
897
+ else:
898
+ shift_dimension=degree
899
+ scc_reduce_from_str_to_slicer(path=tmp_path, slicer=new_slicer, dimension=dimension, backend=backend, shift_dimension=shift_dimension, **minpres_kwargs)
900
+
901
+ new_slicer.minpres_degree = degree
902
+ new_slicer.filtration_grid = slicer.filtration_grid if slicer.is_squeezed else None
903
+ if new_slicer.is_squeezed and auto_clean:
904
+ new_slicer = new_slicer._clean_filtration_grid()
905
+ return new_slicer
907
906
 
908
907
 
909
908
  def to_simplextree(s:Slicer_type, max_dim:int=-1) -> SimplexTreeMulti_type:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multipers
3
- Version: 2.3.5b2
3
+ Version: 2.3.5b3
4
4
  Summary: Multiparameter Topological Persistence for Machine Learning
5
5
  Author-email: David Loiseaux <david.lapous@proton.me>, Hannah Schreiber <hannah.schreiber@inria.fr>
6
6
  Maintainer-email: David Loiseaux <david.lapous@proton.me>
@@ -5,32 +5,32 @@ multipers/distances.py,sha256=uAZj2GtUQp50OxN2qU7sl2JqsmJ74IG9j5tZapLO2Us,6220
5
5
  multipers/filtration_conversions.pxd,sha256=Je7a3F4zS1PQn6Ul1YCXgA6p39X2FouStru-XtN-aOw,10800
6
6
  multipers/filtration_conversions.pxd.tp,sha256=_9tUvZVUA7J_RUM3q7BxY48fYgDHCUA7Xhy4nBfLLs0,3309
7
7
  multipers/filtrations.pxd,sha256=08ONkZNCjs8Nme8lcD9myPz-K662sA-EDpSwzgC2_ts,9461
8
- multipers/function_rips.cp313-win_amd64.pyd,sha256=_OitSR_4vNiaik10cItFc4Eq0f3t2Q1xruoHt6e5UIo,332800
8
+ multipers/function_rips.cp313-win_amd64.pyd,sha256=M5Cn51GrzK8G98oNzXqCMd_NBIe7Y8W1yF-2TL5S4BI,332800
9
9
  multipers/function_rips.pyx,sha256=j5NjbK3YrAv_2s8YHB1JB0k6m9NC7RQCSFlJe-w_kgE,5252
10
- multipers/grids.cp313-win_amd64.pyd,sha256=bUiBsIBX4iu_qQRYdBdbDzFcHKyYusX3NYEMnOCC3uY,483840
10
+ multipers/grids.cp313-win_amd64.pyd,sha256=o0Ihx2sBkUkPjp8eCyR2slW_-ZLwCuAtdNFJf5wcczY,483840
11
11
  multipers/grids.pyx,sha256=8iHLcwm5f4PXJkt6DS81RgiXgyNp5VF4KayF1vBRV4k,19521
12
- multipers/io.cp313-win_amd64.pyd,sha256=jgJ_V8tQx3I3klhGbUXAVFcydbgAaKq2YT70PZdv3-M,220160
13
- multipers/io.pyx,sha256=pQBH_rSqaCZqDSxTLnhlyECP3fLbX2tR_RKJHydHm_0,22210
14
- multipers/mma_structures.cp313-win_amd64.pyd,sha256=cv1WdTVSgaKQVdhgsDoSyYIDtYkB7RQ40XMAH_n78B0,1280000
12
+ multipers/io.cp313-win_amd64.pyd,sha256=87h5m7gZYnGEP4JLHL0M0IvQkMSqTP4zoo2BlDViiis,176640
13
+ multipers/io.pyx,sha256=xnYHHbT-kCTN1Ut9kIVgSvfChv1ef3hXiqC7T4oU8EA,14406
14
+ multipers/mma_structures.cp313-win_amd64.pyd,sha256=vJt3K87hnNq0QCTZkFv598DsGC_kh4twOLXuw-_77Zw,1280000
15
15
  multipers/mma_structures.pxd,sha256=jh1QnQRidt_VK0CK7losQi6rAl_1qG5DNuR23J42pUA,6595
16
16
  multipers/mma_structures.pyx,sha256=1FQ_sqkpHHkCyCLLKkR9lUgZKDZFt-YgjnDd8NGmw6Q,109526
17
17
  multipers/mma_structures.pyx.tp,sha256=QLo4ZZDnFuWNot771jYkYHc9ZQq6CJIpkRkeRwGi7XA,42297
18
18
  multipers/multiparameter_edge_collapse.py,sha256=MFt0eKQQSv2354omeIqOmzASYTKIMsYdxZHFZauQr8g,1229
19
- multipers/multiparameter_module_approximation.cp313-win_amd64.pyd,sha256=Ld4xmAWYLhitAi31LhW5LwxrN4DJk2uTGnfF9LHHZ38,450560
19
+ multipers/multiparameter_module_approximation.cp313-win_amd64.pyd,sha256=AvWauuG3k1pLMjTEripfrD74Y_L1pN4v0qb0zBa2lEY,451072
20
20
  multipers/multiparameter_module_approximation.pyx,sha256=wp7la7Z9wBngnfw6WOVddf93mPyXf4HfNT6dKW2Z0r0,9030
21
21
  multipers/pickle.py,sha256=YYVt4iHiD16E1x5Yn_4mX6P5P8rKi56pNGjJo5IzPhc,2579
22
- multipers/plots.py,sha256=jXENhITNIbLcLpIKibn5MXzxaeq8DEr1WLAoEU3fmTQ,15436
23
- multipers/point_measure.cp313-win_amd64.pyd,sha256=mdmH1Zva2CqP_9gH-nw4nFlXzNnxcE0iFCacL2l88LM,595968
22
+ multipers/plots.py,sha256=ND-XtCq5fNfg9zO7hQOwmQ3jYgDj6PSz4kj7lDv35CI,15496
23
+ multipers/point_measure.cp313-win_amd64.pyd,sha256=mp_ksP9T-zwTTewwEHQt3D9uNiNf9Tg2qXGypvS7UwE,596480
24
24
  multipers/point_measure.pyx,sha256=AzlAz1C0TW6jxPllbhMxG38ISlSE7h4U-y0mT7Uzndc,14084
25
- multipers/simplex_tree_multi.cp313-win_amd64.pyd,sha256=PGbQqlpVeLylx6Sd9TSQSSZvCbS74dDziu_McJEjfIk,3665920
25
+ multipers/simplex_tree_multi.cp313-win_amd64.pyd,sha256=JytMPhmnAl6TkwySM8P9TxgN_qiXsSn_vxDi1tbLcnU,3665920
26
26
  multipers/simplex_tree_multi.pxd,sha256=KBX_vcNgtBjNHThUUOXp0r4HWj3EX1DGa6cX9mDi6aI,6649
27
27
  multipers/simplex_tree_multi.pyx,sha256=lzxlJnkgv43N6gZsYthIuoYKT45jaah9ogUdO1nvWBk,506429
28
28
  multipers/simplex_tree_multi.pyx.tp,sha256=_UCL4n9P0gdqccJPx05dC6lwZFlP64M4WVX0uu6gTlA,90051
29
- multipers/slicer.cp313-win_amd64.pyd,sha256=myLcLrESoOYbcF06mTjQh_DCVipSjY8LHVBROZs9S4s,11913216
29
+ multipers/slicer.cp313-win_amd64.pyd,sha256=z2yl4bKmR71PFg48piCtnTwQudoubSlW1N0avTDoxPs,11894272
30
30
  multipers/slicer.pxd,sha256=RB0W089T2sFVJGdD1N9C274_GqLPqPH0Hb2nEj2WEwM,185510
31
31
  multipers/slicer.pxd.tp,sha256=z-fdpEJWiDncVCFcwVh5Gr_MtRjIV8ln8xOPmd1B1-s,10250
32
- multipers/slicer.pyx,sha256=JgPiG7ZgDeSMuFssyfr710dUdXWjWacewbHmnZwAeCI,947463
33
- multipers/slicer.pyx.tp,sha256=9qgb4CYhZ-hEEF42mLgfbRNbfr5CconsimVnXInDWRQ,47254
32
+ multipers/slicer.pyx,sha256=HLSBCO17sbuaGBknDNzTXImyMrsEc4I3x4s3FmhVxQk,945858
33
+ multipers/slicer.pyx.tp,sha256=1AmMtsYwUGUaSME2l_6899ABRT1FQrb1i-g_OlNAw5w,47288
34
34
  multipers/tbb12.dll,sha256=M6QIBW4AdNhi0lTMy6FcxTPR_BaOYLcQquMZ5YZ6MD8,344576
35
35
  multipers/tbbbind_2_5.dll,sha256=Mys6mt1_Yc4-n0XrKLY4BTPD6QwsqSpbiQHrg5Yk0Bo,23552
36
36
  multipers/tbbmalloc.dll,sha256=DkUcOTkoUlc5bwSWW-KF3Vzdm9lL6EVA_D_SebFH_q4,113664
@@ -38,8 +38,8 @@ multipers/tbbmalloc_proxy.dll,sha256=n_GlUK8IfYnRz0Piuw2mN4HmPHtyBtqDsrqoFkKyCb4
38
38
  multipers/tensor.pxd,sha256=MSmaMU0sOP9CHLmg4dym7nOGaI1S4cOdM01TQ9flI54,417
39
39
  multipers/test.pyx,sha256=-g7WU-jKrZK8H0c-6eAPsfrApjvTKrUoswVYFu8LoV4,1798
40
40
  multipers/array_api/__init__.py,sha256=jyvi7Gzd7Si_imgaodz80fcA-68MikAGk8g79_vj6yo,1545
41
- multipers/array_api/numpy.py,sha256=0Ln_jY891Jei_HQlWY9S_1-lLPYYOzXRyZknPO5ZYTc,2518
42
- multipers/array_api/torch.py,sha256=B5ukw4m2OeHLTLaHSytTKDqdcJ4BwV8nKK3JREJAjuQ,2613
41
+ multipers/array_api/numpy.py,sha256=sYr9Yghuz7QY4tccvDOnv2N4WQa-d5BmyP3YignxiSo,2546
42
+ multipers/array_api/torch.py,sha256=6F5j4-dWD50-YB72hDZUGerDlhYwxmo0H4U7DfhgJio,2639
43
43
  multipers/data/MOL2.py,sha256=nLZHy2OSFN9Z2uJKsbqWOEG2R7G-uH6dCLHG48UjvR4,15428
44
44
  multipers/data/UCR.py,sha256=PuT8l3i26y0goBzIESwdgJAe6YFCyDiWSoxECcP5rhs,798
45
45
  multipers/data/__init__.py,sha256=w7uUe4LOHbdbKU4R8MNs7em65wZJN0v5ukoG1otFanQ,24
@@ -178,8 +178,8 @@ multipers/tests/__init__.py,sha256=-7Fj-zFAfBJv18trg0CPglQTmYu_ehySZGqtJzPlN8U,1
178
178
  multipers/torch/__init__.py,sha256=OLxIiZ389uCqehpUxBPUI_x1SYu531onc4tiTscAuIw,27
179
179
  multipers/torch/diff_grids.py,sha256=2YK-c351tBpj8sfzjf26fbE1l0xlWse7oVVfDHD3zwM,7492
180
180
  multipers/torch/rips_density.py,sha256=H-kmSzY8hXhmVn15Oltc71DHs1IUHg5oPRgNyWW8L4Q,11706
181
- multipers-2.3.5b2.dist-info/licenses/LICENSE,sha256=UsQRnvlo_9wpQS9DNt52GEraERHwK2GIRwuqr2Yv5JI,1071
182
- multipers-2.3.5b2.dist-info/METADATA,sha256=KHctITvlAapkwilssVT9VkgDMeuatKEzPNZOU62f5Ik,9825
183
- multipers-2.3.5b2.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
184
- multipers-2.3.5b2.dist-info/top_level.txt,sha256=L9e0AGmhRzrNw9FpuUx-zlqi5NcBOmrI9wYY8kYWr8A,10
185
- multipers-2.3.5b2.dist-info/RECORD,,
181
+ multipers-2.3.5b3.dist-info/licenses/LICENSE,sha256=UsQRnvlo_9wpQS9DNt52GEraERHwK2GIRwuqr2Yv5JI,1071
182
+ multipers-2.3.5b3.dist-info/METADATA,sha256=ArX2CcO02cx87WhxwEji21LmS5qHNyIzNHzybTvGafM,9825
183
+ multipers-2.3.5b3.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
184
+ multipers-2.3.5b3.dist-info/top_level.txt,sha256=L9e0AGmhRzrNw9FpuUx-zlqi5NcBOmrI9wYY8kYWr8A,10
185
+ multipers-2.3.5b3.dist-info/RECORD,,