class_docstr: Test for ndarray utils.
class_docstr_tok: ["Test","for","ndarray","utils","."]
code: def test_from_src(self):
      img_1 = from_src(logo_path)
      img_2 = from_src(Path(logo_path))
  
      self.assertIsInstance(img_1, Image)
      self.assertIsInstance(img_2, Image)
      self.assertEqual(img_1.width, img_2.width)
      self.assertEqual(img_1.height, img_2.height)
      self.assertEqual(img_1.channel, img_2.channel)
      self.assertEqual(img_1.mode, img_2.mode)
      self.assertTrue((img_1 == img_2).all())
  
file_path: towhee/tests/unittests/utils/test_ndarray_utils.py
imports: import os
  import unittest
  import numpy
  from pathlib import Path
  from towhee.utils.cv2_utils import cv2
  from towhee.types import Image
  from towhee.utils.ndarray_utils import from_ndarray, from_src, to_ndarray, rgb2bgr
label_desc: Use image node_id 1 for calling the TestPilUtils obj's underlying member method code with example usage: obj.test_from_src() without return types