Rohan Singh

Rohan Singh

143 Articles Published

Articles by Rohan Singh

Page 15 of 15

Extracting the real and imaginary parts of a NumPy array of complex numbers

Rohan Singh
Rohan Singh
Updated on 10-Jul-2023 6K+ Views

In Python, we can extract the real and imaginary parts of a NumPy array of the complex number using the real and imag attributes of the array, respectively. Numpy is a Python library that is used for complex calculations and also provides support for complex numbers. In this article, we will understand how we can extract the real and imaginary parts separately of a complex number. Understanding Complex Number in Numpy In Numpy we represent a complex number as a combination of the real and imaginary parts using the complex data type. We can create a complex number in ...

Read More

Difference Between Dataset.from_tensors and Dataset.from_tensor_slices

Rohan Singh
Rohan Singh
Updated on 06-Jul-2023 1K+ Views

Dataset.from_tensors and Dataset.from_tensor_slices are methods in the TensorFlow library that are used to create datasets. Dataset.from_tensor creates a dataset from a single tensor whereas Dataset.from_tensor_slices creates data set by slicing a tensor along the first dimension. In this article, we will understand the difference between the two methods and how they are used in different use cases. from_tensor from_tensor_slices Creates a dataset from a single tensor Creates a dataset by slicing a tensor along the first dimension Useful for small datasets that can fit in memory Useful for large datasets that ...

Read More

Difference between BeautifulSoup and Scrapy Crawler

Rohan Singh
Rohan Singh
Updated on 06-Jul-2023 283 Views

Beautiful Soup and Scrapy Crawler are used for doing web scraping in Python. Both of these tools have the same use case but have different functionalities. Web scraping is useful in data collection and analysis in fields like research, marketing, and business intelligence. In this article, we will understand the difference between Beautiful Soup and Scrapy Crawler and how they are used in web scraping. Feature Beautiful Soup Scrapy Parsing Used for parsing HTML and XML documents Uses a combination of parsing and crawling to extract data from websites. Ease of Use Simple ...

Read More
Showing 141–143 of 143 articles
« Prev 1 11 12 13 14 15 Next »
Advertisements