Best Python code snippet using hypothesis
numpy.py
Source: numpy.py
...710 # We don't usually have a gufunc signature; do the common case first & fast.711 if self.signature is None:712 return self._draw_loop_dimensions(data)713 # When we *do*, draw the core dims, then draw loop dims, and finally combine.714 core_in, core_res = self._draw_core_dimensions(data)715 # If some core shape has omitted optional dimensions, it's an error to add716 # loop dimensions to it. We never omit core dims if min_dims >= 1.717 # This ensures that we respect Numpy's gufunc broadcasting semantics and user718 # constraints without needing to check whether the loop dims will be719 # interpreted as an invalid substitute for the omitted core dims.720 # We may implement this check later!721 use = [None not in shp for shp in core_in]722 loop_in, loop_res = self._draw_loop_dimensions(data, use=use)723 def add_shape(loop, core):724 return tuple(x for x in (loop + core)[-32:] if x is not None)725 return BroadcastableShapes(726 input_shapes=tuple(add_shape(l, c) for l, c in zip(loop_in, core_in)),727 result_shape=add_shape(loop_res, core_res),728 )729 def _draw_core_dimensions(self, data):730 # Draw gufunc core dimensions, with None standing for optional dimensions731 # that will not be present in the final shape. We track omitted dims so732 # that we can do an accurate per-shape length cap.733 dims = {}734 shapes = []735 for shape in self.signature.input_shapes + (self.signature.result_shape,):736 shapes.append([])737 for name in shape:738 if name.isdigit():739 shapes[-1].append(int(name))740 continue741 if name not in dims:742 dim = name.strip("?")743 dims[dim] = data.draw(self.side_strat)...
_array_helpers.py
Source: _array_helpers.py
...431 # We don't usually have a gufunc signature; do the common case first & fast.432 if self.signature is None:433 return self._draw_loop_dimensions(data)434 # When we *do*, draw the core dims, then draw loop dims, and finally combine.435 core_in, core_res = self._draw_core_dimensions(data)436 # If some core shape has omitted optional dimensions, it's an error to add437 # loop dimensions to it. We never omit core dims if min_dims >= 1.438 # This ensures that we respect Numpy's gufunc broadcasting semantics and user439 # constraints without needing to check whether the loop dims will be440 # interpreted as an invalid substitute for the omitted core dims.441 # We may implement this check later!442 use = [None not in shp for shp in core_in]443 loop_in, loop_res = self._draw_loop_dimensions(data, use=use)444 def add_shape(loop, core):445 return tuple(x for x in (loop + core)[-NDIM_MAX:] if x is not None)446 return BroadcastableShapes(447 input_shapes=tuple(add_shape(l_in, c) for l_in, c in zip(loop_in, core_in)),448 result_shape=add_shape(loop_res, core_res),449 )450 def _draw_core_dimensions(self, data):451 # Draw gufunc core dimensions, with None standing for optional dimensions452 # that will not be present in the final shape. We track omitted dims so453 # that we can do an accurate per-shape length cap.454 dims = {}455 shapes = []456 for shape in self.signature.input_shapes + (self.signature.result_shape,):457 shapes.append([])458 for name in shape:459 if name.isdigit():460 shapes[-1].append(int(name))461 continue462 if name not in dims:463 dim = name.strip("?")464 dims[dim] = data.draw(self.side_strat)...
Check out the latest blogs from LambdaTest on this topic:
Developed in 2004 by Thoughtworks for internal usage, Selenium is a widely used tool for automated testing of web applications. Initially, Selenium IDE(Integrated Development Environment) was being used by multiple organizations and testers worldwide, benefits of automation testing with Selenium saved a lot of time and effort. The major downside of automation testing with Selenium IDE was that it would only work with Firefox. To resolve the issue, Selenium RC(Remote Control) was used which enabled Selenium to support automated cross browser testing.
JavaScript is one of the most widely used programming languages. This popularity invites a lot of JavaScript development and testing frameworks to ease the process of working with it. As a result, numerous JavaScript testing frameworks can be used to perform unit testing.
Hey Testers! We know it’s been tough out there at this time when the pandemic is far from gone and remote working has become the new normal. Regardless of all the hurdles, we are continually working to bring more features on-board for a seamless cross-browser testing experience.
Coaching is a term that is now being mentioned a lot more in the leadership space. Having grown successful teams I thought that I was well acquainted with this subject.
Building a website is all about keeping the user experience in mind. Ultimately, it’s about providing visitors with a mind-blowing experience so they’ll keep coming back. One way to ensure visitors have a great time on your site is to add some eye-catching text or image animations.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!