prefab 1.1.8__py3-none-any.whl → 1.1.9__py3-none-any.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.
prefab/__init__.py CHANGED
@@ -5,7 +5,7 @@ Usage:
5
5
  import prefab as pf
6
6
  """
7
7
 
8
- __version__ = "1.1.8"
8
+ __version__ = "1.1.9"
9
9
 
10
10
  from . import compare, geometry, predict, read, shapes
11
11
  from .device import BufferSpec, Device
prefab/device.py CHANGED
@@ -413,22 +413,17 @@ class Device(BaseModel):
413
413
  """
414
414
  device_array = np.copy(self.device_array)
415
415
  buffer_thickness = self.buffer_spec.thickness
416
- buffer_mode = self.buffer_spec.mode
417
416
 
418
- crop_top = buffer_thickness["top"] if buffer_mode["top"] == "constant" else 0
419
- crop_bottom = (
420
- buffer_thickness["bottom"] if buffer_mode["bottom"] == "constant" else 0
421
- )
422
- crop_left = buffer_thickness["left"] if buffer_mode["left"] == "constant" else 0
423
- crop_right = (
424
- buffer_thickness["right"] if buffer_mode["right"] == "constant" else 0
425
- )
417
+ crop_top = buffer_thickness["top"]
418
+ crop_bottom = buffer_thickness["bottom"]
419
+ crop_left = buffer_thickness["left"]
420
+ crop_right = buffer_thickness["right"]
426
421
 
427
422
  ndarray = device_array[
428
423
  crop_top : device_array.shape[0] - crop_bottom,
429
424
  crop_left : device_array.shape[1] - crop_right,
430
425
  ]
431
- return np.squeeze(ndarray)
426
+ return ndarray
432
427
 
433
428
  def to_img(self, img_path: str = "prefab_device.png"):
434
429
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prefab
3
- Version: 1.1.8
3
+ Version: 1.1.9
4
4
  Summary: Artificial nanofabrication of integrated photonic circuits using deep learning
5
5
  Project-URL: Homepage, https://prefabphotonics.com
6
6
  Project-URL: Repository, https://github.com/PreFab-Photonics/PreFab
@@ -1,14 +1,14 @@
1
- prefab/__init__.py,sha256=V4m0w3VrKeMgeNeqyc_45E5KXH9fVOQKO5xyH42uDmg,425
1
+ prefab/__init__.py,sha256=lrYoADI1MlequuC41Rly8vr1kAiFrG8zGw1PILM1rf4,425
2
2
  prefab/__main__.py,sha256=1eXWiEoG7eetJMm1qRbK2I5MnzuRgKIoQtBeT-Ps8es,3523
3
3
  prefab/compare.py,sha256=0Xgp3tFuP4of-ce9Opc19p8i8lIyXkbVGLuwWBaHSeE,3486
4
- prefab/device.py,sha256=1rqs_VQ7am6W473C-EZTsPFDlqNIMMd26VZAUV1tNS0,54885
4
+ prefab/device.py,sha256=bN-RkbjhUOXlrnYEJW4H2HqhyxvFrQa15EvhOmGXgkY,54603
5
5
  prefab/geometry.py,sha256=4fekWMlkdS_qlPNTdPXPhwKuQ5qdQ1Zjf8m9JKd1dA8,12049
6
6
  prefab/models.py,sha256=waPNGtuISyY0f8cz7dnbD451CKYCt8EpPGt-4lSOPNU,2581
7
7
  prefab/predict.py,sha256=h13523jasg1WbdiYbkXy43SWTGfQXjq6oEe0O8DT2U0,11731
8
8
  prefab/read.py,sha256=WNqC3xENlndzFwXeCF2E7H3Iq2dO_6rPEPZ58DuloqY,16259
9
9
  prefab/shapes.py,sha256=58cyXFNh1kEErq2jEbGd3dWSediU1OSmor_FWwc1V8A,25098
10
- prefab-1.1.8.dist-info/METADATA,sha256=d5ide0FP2wUQALM_2SSFhA_BGU6s3waxWjtXwsbjivs,35036
11
- prefab-1.1.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- prefab-1.1.8.dist-info/entry_points.txt,sha256=h1_A9O9F3NAIoKXD1RPb3Eo-WCSiHhMB_AnagBi6XTQ,48
13
- prefab-1.1.8.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
14
- prefab-1.1.8.dist-info/RECORD,,
10
+ prefab-1.1.9.dist-info/METADATA,sha256=Un--7bA5ihvvtaXK733Q1Zd_8d-EBl1ohWfcdJCdOBI,35036
11
+ prefab-1.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ prefab-1.1.9.dist-info/entry_points.txt,sha256=h1_A9O9F3NAIoKXD1RPb3Eo-WCSiHhMB_AnagBi6XTQ,48
13
+ prefab-1.1.9.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
14
+ prefab-1.1.9.dist-info/RECORD,,
File without changes