Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

function
numpy
python
communitycreator

What is the char.istitle() in NumPy?

Onyejiaku Theophilus Chidalu

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Overview

The char.istitle() function in NumPy returns True for each element of an input array of string if the element is a titlecased string and there is at least one character. Otherwise, False is returned.

Syntax

char.istitle(a)
Syntax for the char.istitle() function

Parameter value

The char.istitle() function takes a single parameter value, a which represents an input array of strings or Unicode.

Return value

The char.istitle() function returns an output array of Boolean values with the same shape as the input array.

Example

import numpy as np
# creating an input array
a = np.array(['Title Case', "TITLE CASE", "title case", "TITLE case",])
# implementing the char.istitle() function
myarray = np.char.istitle(a)
# printing the input array
print(a)
# printing the output arrays
print(myarray)
Simple example using the char.istitle() function

RELATED TAGS

function
numpy
python
communitycreator

CONTRIBUTOR

Onyejiaku Theophilus Chidalu

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring