segyio 1.9.11__cp310-cp310-win32.whl → 1.9.13__cp310-cp310-win32.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 segyio might be problematic. Click here for more details.

segyio/__init__.py CHANGED
@@ -76,8 +76,8 @@ class Enum(object):
76
76
  @classmethod
77
77
  def enums(cls):
78
78
  result = []
79
- for v in cls.__dict__.values():
80
- if isinstance(v, int):
79
+ for k, v in cls.__dict__.items():
80
+ if isinstance(v, int) and not str.startswith(k, "_"):
81
81
  result.append(cls(v))
82
82
 
83
83
  return sorted(result, key=int)
Binary file
segyio/line.py CHANGED
@@ -196,13 +196,8 @@ class Line(Mapping):
196
196
  except TypeError: pass
197
197
 
198
198
  # prioritise the code path that's potentially in loops externally
199
- try:
199
+ if not isinstance(index, slice) and not isinstance(offset, slice):
200
200
  head = self.heads[index] + self.offsets[offset]
201
- except TypeError:
202
- # index is either unhashable (because it's a slice), or offset is a
203
- # slice.
204
- pass
205
- else:
206
201
  return self.filehandle.getline(head,
207
202
  self.length,
208
203
  self.stride,
@@ -287,9 +282,8 @@ class Line(Mapping):
287
282
  try: index, offset = index
288
283
  except TypeError: pass
289
284
 
290
- try: head = self.heads[index] + self.offsets[offset]
291
- except TypeError: pass
292
- else:
285
+ if not isinstance(index, slice) and not isinstance(offset, slice):
286
+ head = self.heads[index] + self.offsets[offset]
293
287
  return self.filehandle.putline(head,
294
288
  self.length,
295
289
  self.stride,
@@ -422,14 +416,8 @@ class HeaderLine(Line):
422
416
  try: index, offset = index
423
417
  except TypeError: pass
424
418
 
425
- try:
419
+ if not isinstance(index, slice) and not isinstance(offset, slice):
426
420
  start = self.heads[index] + self.offsets[offset]
427
- except TypeError:
428
- # index is either unhashable (because it's a slice), or offset is a
429
- # slice.
430
- pass
431
-
432
- else:
433
421
  step = self.stride * len(self.offsets)
434
422
  stop = start + step * self.length
435
423
  return self.header[start:stop:step]
@@ -489,9 +477,8 @@ class HeaderLine(Line):
489
477
  try: index, offset = index
490
478
  except TypeError: pass
491
479
 
492
- try: start = self.heads[index] + self.offsets[offset]
493
- except TypeError: pass
494
- else:
480
+ if not isinstance(index, slice) and not isinstance(offset, slice):
481
+ start = self.heads[index] + self.offsets[offset]
495
482
  step = self.stride * len(self.offsets)
496
483
  stop = start + step * self.length
497
484
  self.header[start:stop:step] = val
segyio/open.py CHANGED
@@ -166,8 +166,8 @@ def open(filename, mode="r", iline = 189,
166
166
  f = segyio.SegyFile(fd,
167
167
  filename = str(filename),
168
168
  mode = mode,
169
- iline = iline,
170
- xline = xline,
169
+ iline = int(iline),
170
+ xline = int(xline),
171
171
  endian = endian,
172
172
  )
173
173
 
@@ -189,4 +189,4 @@ def open(filename, mode="r", iline = 189,
189
189
  if ignore_geometry:
190
190
  return f
191
191
 
192
- return infer_geometry(f, metrics, iline, xline, strict)
192
+ return infer_geometry(f, metrics, int(iline), int(xline), strict)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: segyio
3
- Version: 1.9.11
3
+ Version: 1.9.13
4
4
  Summary: Simple & fast IO for SEG-Y files
5
5
  Home-page: https://github.com/equinor/segyio
6
6
  Author: Equinor ASA
@@ -14,17 +14,25 @@ Classifier: Intended Audience :: Science/Research
14
14
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
15
15
  Classifier: Natural Language :: English
16
16
  Classifier: Programming Language :: Python
17
- Classifier: Programming Language :: Python :: 3.6
18
- Classifier: Programming Language :: Python :: 3.7
19
- Classifier: Programming Language :: Python :: 3.8
20
17
  Classifier: Programming Language :: Python :: 3.9
21
18
  Classifier: Programming Language :: Python :: 3.10
22
19
  Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
23
22
  Classifier: Topic :: Scientific/Engineering
24
23
  Classifier: Topic :: Scientific/Engineering :: Physics
25
24
  Classifier: Topic :: Software Development :: Libraries
26
25
  Classifier: Topic :: Utilities
27
- Requires-Dist: numpy (>=1.10)
26
+ Requires-Dist: numpy>=1.10
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: home-page
32
+ Dynamic: license
33
+ Dynamic: platform
34
+ Dynamic: requires-dist
35
+ Dynamic: summary
28
36
 
29
37
 
30
38
  =======
@@ -1,12 +1,12 @@
1
- segyio/__init__.py,sha256=WvIeQRP_Zfa10kOEh47fv1VsH8itanpPLIouOAVwzJs,3608
2
- segyio/_segyio.cp310-win32.pyd,sha256=6FemwmlneJaR8WcD5rBGsPtF7syu6RvSo1F4V0AG-kY,56832
1
+ segyio/__init__.py,sha256=XnOfYCmt01Ss56Plkmurbca3ZWsBr_dqzZ4NY-X1gR0,3641
2
+ segyio/_segyio.cp310-win32.pyd,sha256=wYiEhKZ5MZkXmI50CWjhgk1Jvle3Akd2BBWT_Od6w7w,56832
3
3
  segyio/binfield.py,sha256=kyiw8_J9Zu6KcNXLKFapub7JNvQr93X_g54I53Ade2w,2562
4
4
  segyio/create.py,sha256=vv77J_9th30B-4mgCX1XJLdDdfIQRcMnymac-hkM7m4,8288
5
5
  segyio/depth.py,sha256=EsBUGpRGxvbOXE-3C-2q2nloRb4Yu_WxXGKQG7Hh4b4,5643
6
6
  segyio/field.py,sha256=66QtiTe1TfbIOJbxwzjuTJpZZ6sAfrcJhkTZxxfNDTc,19776
7
7
  segyio/gather.py,sha256=rKutfM6SvlNVDceH2ccBbW2-oh2MAWeQnMeuhITVQM4,13543
8
- segyio/line.py,sha256=nfhYpZ03OBC6xZDp28iYUNABzYryDHo9EIqwZ9Iz_3s,17498
9
- segyio/open.py,sha256=2OI5BrLmWlqkuTCZeR3wlS61eaqqnzS5CcIE-GtaF4g,5942
8
+ segyio/line.py,sha256=R3x8qpFQL1rUiciJicPgGXEhk1Y76rMXIb3ly8HAjHE,17350
9
+ segyio/open.py,sha256=L2Tn65mvm5jcLaJSbCMOM0FM1WdgZkobgRLfyDViR4c,5962
10
10
  segyio/segy.py,sha256=Wu4rUGTfLNZfor9iQ44x2A9Zw9yRNImthGwwk1ho1LE,28856
11
11
  segyio/segysampleformat.py,sha256=270R67qgsU34z1YXVqYIkOIVsOimItwiAHviHK8WHfw,529
12
12
  segyio/tools.py,sha256=uOZ21Db85PhVzg6DbGADtbB0GByDRKi-uPN_qqKJcoI,21880
@@ -17,7 +17,7 @@ segyio/utils.py,sha256=3xsOgu2zNVh-ZomW1o-0mkxDGVp5qj1NhOgpA6kI9bM,1091
17
17
  segyio/su/__init__.py,sha256=4xDXkp_BYI4-arr9i7Q0jPqpiTzcwQRrakXNyG8jR24,46
18
18
  segyio/su/file.py,sha256=RwkZBaKBiRDW79ltEojMIh8u2rv8EfayhK2X5QtHqVk,3065
19
19
  segyio/su/words.py,sha256=6PXaL43luH9Ex31ZdhqHetlyKeAut_LMqZGHPKczCNs,5096
20
- segyio-1.9.11.dist-info/METADATA,sha256=x1CFxhUqyjIeMy3R-PV7JEPLFxqvYdfkXdr2NY3p3d4,2793
21
- segyio-1.9.11.dist-info/WHEEL,sha256=UZxi2yb0YAgKOfmcCjRHnsZRFug-pO4yl8aF5PH3XfI,92
22
- segyio-1.9.11.dist-info/top_level.txt,sha256=9JZUlMVxkQCR1s0sEBvt1G8Om5tWAmrmQojEIcCUTjk,7
23
- segyio-1.9.11.dist-info/RECORD,,
20
+ segyio-1.9.13.dist-info/METADATA,sha256=QUOFM1h2DvVdJmHuBsyfqJIXIswMduM-jymthnBQ_cA,2923
21
+ segyio-1.9.13.dist-info/WHEEL,sha256=DPcJj7Ook17rexnkF8BGLo2G809zKyL5nobytY-Ctec,92
22
+ segyio-1.9.13.dist-info/top_level.txt,sha256=9JZUlMVxkQCR1s0sEBvt1G8Om5tWAmrmQojEIcCUTjk,7
23
+ segyio-1.9.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: skbuild 0.16.7
2
+ Generator: skbuild 0.18.1
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-win32
5
5